You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mcp, server): Implement Tool output schema with generics
This commit replaces the builder-style `WithOutput*` functions with a single, type-safe generic function, `WithOutputType[T any]`.
Developers can now define a tool's output schema using a standard Go struct with `json` and `jsonschema` tags, simplifying the API and improving developer experience.
Key changes:
- Adds `invopop/jsonschema` for schema generation from structs.
- Improves server-side validation to correctly skip validation on tool errors.
- Adds new generic helper functions (`NewToolResultStructured`, etc.) for creating structured results.
- Updates and adds tests to cover the new API and validation logic.
0 commit comments