Skip to content

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

Open
92Infinitus92 wants to merge 1 commit into
feat/pump-protocolfrom
feat/mcp-template-index
Open

Split override templates into a light index and a per-template detail tool#4
92Infinitus92 wants to merge 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 replaces the full override-template listing with a lightweight index and adds a separate tool for retrieving one template’s details.

  • Returns only identifying and classification fields from the template index and resource.
  • Adds get_override_template for properties, address information, LLM context, and summarized constants.
  • Updates MCP guidance and tests for the index → detail → constant search → scenario workflow.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/mcp/src/surfpool/mod.rs Splits override-template discovery from detailed retrieval, updates tool guidance and resource output, and adds focused coverage for the new workflow.

Sequence Diagram

sequenceDiagram
    participant Agent
    participant MCP as Surfpool MCP
    Agent->>MCP: get_override_templates()
    MCP-->>Agent: Lightweight template index
    Agent->>MCP: get_override_template(templateId)
    MCP-->>Agent: Properties, address, context, constant summaries
    Agent->>MCP: search_constant_options(templateId, constant, query)
    MCP-->>Agent: Concrete constant values
    Agent->>MCP: create_scenario(...)
    MCP-->>Agent: Registered scenario result
Loading

Reviews (3): 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
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.

1 participant