Skip to content

[FEATURE] Semantic Dynamic Tool Registry #1677

@dbschmigelski

Description

@dbschmigelski

Priority: Medium

Problem Statement

Every registered tool is sent with every request regardless of relevance to the current task. An agent with 100 tools sends all 100 definitions, wasting context and confusing tool selection. Existing solutions have gaps:

  • AgentCore Gateway only works with remote MCPs; local MCP servers are invisible
  • MCP's SEP-1821 only filters within a single server, not cross-source

Proposed Solution

A SemanticDynamicToolRegistry that automatically loads and removes tools during lifecycle events. The registry monitors conversation context and proactively adjusts the active tool set without agent intervention.

Agent(
    tools=[mcp1, mcp2, mcp3],
    tool_selection="semantic_dynamic",
    tool_registry=SemanticDynamicToolRegistry(..)
)

Can be backed by a vector store for semantic similarity search, or use a simpler file-based approach with LLM calls to determine relevance. Works with any tool source (local or remote) and searches across all of them.

Use Case

  • Agents connected to multiple MCP servers with large combined tool sets
  • Reducing context overhead from irrelevant tool definitions
  • Improving tool selection accuracy by narrowing the active set

Additional Context

Part of the Context Management epic, Track 2: Tool Context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions