← AI Techniques Radar
Agents & tool use

MCP tool-discovery + LLM tool-calling loop for a tiny agent

Connect to one or more MCP servers, discover their exposed tools, pass those tools to an LLM via the tools field, then run a control loop that alternates between LLM tool calls and executing those tool calls through the MCP client until the LLM stops requesting tools.

Discovered 2026-11-10 · Sources checked 2026-11-10

This summary was generated with AI assistance.

Why it matters

It turns “agent behavior” into a reusable pattern: the agent’s capabilities come from MCP servers (tool discovery), while the agent’s decision-making/control flow comes from the LLM’s tool-calling behavior, implemented as a simple loop.

What changed

Instead of hard-coding tool interfaces or manually maintaining tool lists and parsing logic, the agent dynamically pulls available tools from MCP servers and uses the LLM’s native function/tool calling interface to request tool execution.

Where it helps

  • Local tool-using chat assistants that can browse files and run browser automation via MCP tools
  • Multi-server agents that combine capabilities from multiple MCP servers in one conversation
  • Lightweight agent prototypes where tool interfaces change over time
  • Agent control-flow that can pause for user clarification via dedicated tools

Evidence & reproduction

Reproduction not evaluated. A linked paper or repository does not establish independent reproduction.

Limitations & open questions

The approach relies on tool calling support in the chosen LLM/inference path and assumes the tool execution plumbing (e.g., mapping tool names to MCP sessions and parsing tool call arguments) is correctly implemented.

Sources