Skip to content

[Feature]: MCP, CodeMode, semantic pre-filtering #2

@qdrddr

Description

@qdrddr

MCP Code mode

https://github.com/mcp-use/mcp-use/blob/python-v1.4.1/libraries/python/mcp_use/agents/managers/tools/search_tools.py#L23-L55

Semantic tool Prefiltering

and reducing long enumerations for the tool parameters.

https://github.com/stanford-mast/a1/blob/main/src/a1/extra_strategies.py#L22-L73

Add dependency graph

When you have hundreds of MCP Servers and Thousands of tools.

To reliably select, based on the user query, and ideally with type-safety checks of allowed parameter types and patterns a short list of applicable MCP tools to reduce Context Rot. Since even SotA models, even with 1M context, suffer when you have more than 50 tools total, especially on multi-step tasks.

And to make it more reliable, you could add a graph-like technique that could add tools that either often used together but optional, or maybe even require other tools to be executed before the given tool.

One such MCP + Graph example is here
https://github.com/pratikjadhav2726/Unified-MCP-Tool-Graph/

For inspiration
https://github.com/ai-that-works/ai-that-works/tree/main/2025-05-27-mcp-with-10000-tools

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions