Exposing Tools: Declarative Tool Definitions
~12 min read
Tools are the main way an MCP server exposes functionality — in mcp-use, each tool is a small, declarative definition with a name, input parameters, and a callback returning content.
Exposing Tools: Declarative Tool Definitions is a Pro topic
Sign in, then upgrade to Pro or Power to unlock this topic and the full AI Engineering curriculum.
Key points
- •Tools are the main way an MCP server exposes functionality — actions the agent can perform, from API calls to calculations
- •In mcp-use, each tool is a small declarative definition: a name, input parameters, and a callback that returns content
- •The book's minimal example: a get_weather tool returning a basic weather response
- •Any MCP-compatible client automatically discovers and invokes registered tools during capability negotiation — no manual client-side registration needed
- •This makes tool definitions portable: the same tool works identically across any MCP-compliant client without tool-specific integration code