Agent Build Tutor
Map / Outline

Tools and MCP

Give the model typed actions, and serve them over a protocol any harness can call.

What it is and why it exists

What

A tool is a function with a name, a description, and a JSON schema for its arguments. The Model Context Protocol is a standard way to serve tools from a separate process so any compatible client can list and call them.

Why

Tools are how an agent reads data and acts. Serving them over MCP means the chat agent, a coding agent, and an editor share one implementation. Tool design also decides how often the model picks the wrong instrument.

How it works

Where it sits in the build order

Needs first

  • API and gatewayTool calling rides on the chat contract: tool schemas go in the request and tool calls come back in the response. Key scope decides who gets tools.Build out of order Stub it with: Call tool functions directly from a test script.

Unlocks

  • Harness engineeringA loop with no tools is a chat proxy. You need at least one registered tool with a schema to exercise the tool path.
  • Guardrails and verificationThe guard compares the answer with tool results. Tools must return structured values the guard can parse.
  • SDKs and frameworksTools are the part you carry between SDKs. Having them as MCP servers makes the comparison a configuration change.

In the reference build

PathRole
apps/agent-server/tools/registry.pySchemas and the call_tool dispatcher.
apps/agent-server/mcp_client.pyConnects to external MCP servers and registers their tools.
apps/mcp-servers/brainbank/server.pyServes the knowledge and data tools to any MCP client.
.mcp.jsonClient config: command, arguments, environment, timeout.

The same idea on other platforms

PlatformHow this module maps
DatabricksUnity Catalog functions are governed tools. Managed MCP servers expose Vector Search, Genie, and functions. You can also host a custom MCP server as a Databricks App.
IBM watsonxOrchestrate tools are Python functions, OpenAPI specs, or MCP servers imported with the ADK. A tool written as an MCP server here can be registered there.
CodexAdd MCP servers in the config file. Tools then appear to the agent. This is the direct route for reusing your own tools.
CursorAdd servers to the project MCP config. Same server, no code change.
Claude Code / Agent SDKAdd servers to the project MCP file. The reference build shares one server between its chat agent and its coding agent this way.
Another machineAn MCP server is a process speaking JSON-RPC over stdio or HTTP. It runs anywhere Python or Node runs.

Explain it back

Answer aloud first. Then open the answer and compare.

A tool returns an empty list. What should the agent be allowed to conclude?
A strong answerOnly that this filter matched nothing. It may report what it searched. It may not explain why the data cannot exist. The tool's diagnostic should name the filter to relax.
Why serve tools over MCP when the harness could import them?
A strong answerOne implementation then serves every harness. Moving to another platform means registering the server, with no rewrite.

From the live build

Recent changes and files the sync job filed under this module.

Ask the tutor about this module