Skip to content

Split override templates into a light index and a per-template detail tool - #4

Merged
92Infinitus92 merged 1 commit into
feat/pump-protocolfrom
feat/mcp-template-index
Aug 19, 2026
Merged

Split override templates into a light index and a per-template detail tool#4
92Infinitus92 merged 1 commit into
feat/pump-protocolfrom
feat/mcp-template-index

Conversation

@92Infinitus92

@92Infinitus92 92Infinitus92 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

get_override_templates returned every template in full: properties, PDA layout, the whole constant catalog, and a ~160KB IDL inlined per template. An agent had to load all of that just to see what was available.

This splits it in two:

  • get_override_templates now returns a light index - id, name, description, protocol, account type, tags, and a hasLlmContext flag. No properties, no IDL, no inlined options.
  • get_override_template(templateId) returns one template's full detail, with each constant summarized as {label, description, optionsCount} instead of the raw option list.

The flow is index → pick → detail → search_constant_options for a concrete value → create_scenario, and the guidance text walks the model through that order.

Stacked on #3 (base feat/pump-protocol); I'll retarget to develop once that merges.

Greptile Summary

The PR splits override-template discovery into a lightweight index and a separate full-detail lookup.

  • Adds get_override_template(templateId) with validation for unknown IDs.
  • Makes the existing tool and MCP resource return lightweight index entries.
  • Updates tool guidance and tests for the index → detail → constant search → scenario flow.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/mcp/src/surfpool/mod.rs Adds the per-template detail tool, converts template listings to lightweight index responses, updates guidance, and tests the new flow.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[get_override_templates] --> B[Pick templateId]
    B --> C[get_override_template]
    C --> D[search_constant_options]
    D --> E[create_scenario]
Loading

Reviews (4): Last reviewed commit: "Split override templates into a light in..." | Re-trigger Greptile

@92Infinitus92 92Infinitus92 self-assigned this Aug 11, 2026
@92Infinitus92

Copy link
Copy Markdown
Collaborator Author

@greptileai

@92Infinitus92
92Infinitus92 force-pushed the feat/mcp-template-index branch 2 times, most recently from 9ecf2de to 3ce7caa Compare August 12, 2026 12:40
@92Infinitus92
92Infinitus92 marked this pull request as ready for review August 12, 2026 12:40
@92Infinitus92
92Infinitus92 force-pushed the feat/pump-protocol branch 2 times, most recently from bb33ae4 to 0606ab5 Compare August 17, 2026 08:33
@92Infinitus92
92Infinitus92 force-pushed the feat/mcp-template-index branch from 3ce7caa to 21bb8d3 Compare August 17, 2026 08:33
@92Infinitus92
92Infinitus92 force-pushed the feat/mcp-template-index branch from 21bb8d3 to d508ead Compare August 19, 2026 06:03
@92Infinitus92
92Infinitus92 merged commit 0ec2148 into feat/pump-protocol Aug 19, 2026
1 check passed
92Infinitus92 added a commit that referenced this pull request Aug 19, 2026
* Add Pump and PumpSwap state-preparation templates

* Document pump template fields and expose the migration authority

Give every field of the pump-global, pump-amm-pool-state and pump-amm-global-config
templates a label and description (they were bare name lists), and add a field reference
to both pump READMEs. Expose Global.withdraw_authority so a migrate can be driven on a
fork. Trim the bonding-curve llmContext of its redundant worked example and the niche
cost formula.

* feat(pump): Token-2022 graduation state preparation

Prepare a near-complete Token-2022 pump.fun curve so one buy graduates it:
a graduation calculator/validator, the pump-token-2022-curve-balance template
with a tail-safe Token-2022 amount write, the /v1/scenarios/pump-graduation
endpoint and MCP tool, and an ignored buy_v2 -> migrate_v2 -> sell lifecycle
harness backed by a frozen snapshot fixture.

* feat(pump): add PumpSwap price shock scenario

* test(pump): verify scenario-driven lifecycle

* fix(pump): guard SOL-only graduation preset

* Split override templates into a light index and a per-template detail tool (#4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants