Skip to main content
Feedback

Dynamic tool discovery

Dynamic tool discovery in MCP Gateway lets agents load only the tools a task needs at runtime, instead of injecting the full tool catalog into the model's context. This feature builds on Tool groups.

Why it matters

As tool catalogs grow, sending every tool definition with each request consumes a large amount of context. Loading only the tools relevant to the current task reduces that overhead, restoring context for reasoning and execution.

Dynamic tool discovery addresses three problems that appear as catalogs scale:

  • Context overhead: Full catalog injection consumes tokens that cannot be used for reasoning, memory, or output.

  • Accuracy degradation: Tool selection quality drops when a model sees too many tools at once. Fewer visible tools reduce ambiguity and incorrect calls.

  • Governance blind spots: When every tool is always in scope, it is hard to know what an agent was allowed to use at decision time. Dynamic tool discovery makes the eligibility boundary explicit.

How it works

Dynamic tool discovery follows the principle of discovery first, injection second. Instead of loading the full catalog upfront, agents discover the relevant tools for a task at runtime. MCP Gateway then expands only those tools into the active context.

MCP Gateway governs this through tool groups:

  • Tool groups organize tools across multiple servers into reusable collections aligned to workflows.

  • You can apply groups across multiple agents, keeping access consistent.

  • Agent Access Control controls tool exposure at runtime, based on identity and workflow.

Keeping the tool list current

MCP Gateway aligns with MCP List Changed Notification. When tool access changes, MCP Gateway signals connected clients so the tool list can refresh. The list updates automatically for clients that support this behavior. Where client support is incomplete, you might need to restart or resync the client.

On this Page