Re:Introducing The Model Context Protocol
by filearts on Monday November 25, 2024 @06:17PM
(#42241092)
If you were willing to bring additional zod tooling or move to something like TypeBox (https://github.com/sinclairzx81/typebox), the json schema would be a direct derivation of the tools' input schemas in code.
Re:Introducing The Model Context Protocol
by rictic on Tuesday November 26, 2024 @01:14AM
(#42242979)
The json-schema-to-ts npm package has a FromSchema type operator that converts the type of a json schema directly to the type of the values it describes. Zod and TypeBox are good options for users, but for the reference implementation I think a pure type solution would be better.
Could I convince you to submit a PR? We'd love to include community contributions!