Problem statement
Right now, when defining a tool in xmcp, the output schema is not supported.
Adding support for an output schema would significantly improve compatibility with LLM tool-calling (OpenAI, Anthropic, etc.), which benefits greatly from explicit schemas.
Proposed solution
- Automatically infer the output schema from the handler function's return type (using TypeScript reflection, Zod inference helpers, or a similar mechanism).
- Assign it to the tool's outputSchema property if no explicit schema was provided by the developer.
Package
xmcp (core framework)
Problem statement
Right now, when defining a tool in xmcp, the output schema is not supported.
Adding support for an output schema would significantly improve compatibility with LLM tool-calling (OpenAI, Anthropic, etc.), which benefits greatly from explicit schemas.
Proposed solution
Package
xmcp (core framework)