Skip to content

Fast-agent as “Advanced Tool Use” runtime for MCP: static config-based filtration + dynamic discover/learn/execute + MCP-proxy mode to reduce tool context bloat #589

@iqdoctor

Description

@iqdoctor

Summary

  • MCP tool schemas can consume tens of thousands of tokens before work starts; tool selection errors also rise with large toolsets.
  • Proposal: fast-agent as an “Advanced Tool Use” runtime for MCP with static config-based filtration + dynamic discover/learn/execute + MCP-proxy mode to reduce context bloat.
  • Phase 1 is policy controls: static tools filtering in fastagent.config.yaml (AgentCard semantics).

Phased plan

  1. Phase 1: static config filtering (fastagent.config.yaml, per-server allowlist + glob patterns; omitted = allow all)
  2. Phase 2: discover/learn/execute meta-tools + on-demand schema hydration + caching in proxy mode
  3. Phase 3: Tool Use Examples + Programmatic Tool Calling

Visuals

Context usage: Traditional vs. Tool Search Tool
Source: https://www.anthropic.com/engineering/advanced-tool-use (figure: Context Usage: Traditional vs. Tool Search Tool).

flowchart LR
  C["Client / IDE\n(Claude Code, etc.)"] <--> |"MCP: tools/list + tools/call"| FA["fast-agent-mcp-proxy"]

  FA <--> |"MCP upstream"| S1["Google Sheets MCP"]
  FA <--> |"MCP upstream"| S2["Google Calendar MCP"]
  FA <--> |"MCP upstream"| S3["Todoist MCP"]
  FA <--> |"MCP upstream"| S4["...more MCP servers..."]

  subgraph R["fast-agent responsibilities"]
    D["discover_tools / tool_search (compact tool cards)"]
    L["learn_tool (fetch 1 schema on-demand)"]
    E["execute_tool (proxy tools/call)"]
    P["policy: allowlist/denylist + caching + limits"]
  end

  FA -.-> D
  FA -.-> L
  FA -.-> E
  FA -.-> P
Loading

Full writeup

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions