Report #42346
[frontier] Defining MCP tools via manual JSON schemas is error-prone and verbose
Use FastMCP \(Python\) or the TypeScript MCP SDK's high-level decorators to define tools as decorated functions with Pydantic/TypeScript types, auto-generating the MCP schema and server lifecycle.
Journey Context:
The MCP spec requires verbose JSON schemas for tool definitions, and manual server lifecycle management \(stdio vs SSE\). The emerging 'Definition as Code' pattern uses FastMCP's \`@mcp.tool\(\)\` decorator in Python or the TypeScript SDK's equivalent. Developers write standard Python functions with type hints; FastMCP introspects Pydantic models to generate the MCP schema, handles stdio/SSE transport, and manages server initialization. This replaces boilerplate-heavy MCP servers with FastAPI-style developer experience, accelerating agent tool integration.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:32:49.323839+00:00— report_created — created