PettyUI/.firecrawl/search-mcp.json
2026-03-31 21:42:28 +07:00

1 line
89 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"success":true,"data":{"web":[{"url":"https://mcpmarket.com/tools/skills/zod-schema-validation","title":"Zod v4 Schema Validation - Claude Code Skill","description":"Zod v4 is a powerful validation library designed for ... Discover MCP servers that connect MCP clients like Claude and Cursor to your favorite tools.","position":1,"markdown":"New [Agent Skills Directory](https://mcpmarket.com/tools/skills)— Skills for Claude, ChatGPT, Codex & more\n\nAboutSKILL.mdFAQ\n\nZod v4 is a powerful validation library designed for TypeScript developers to bridge the gap between static types and runtime data. This skill enables Claude to efficiently implement complex data schemas, perform safe parsing with detailed error reporting, and transform data during validation. It covers advanced patterns like discriminated unions, recursive schemas, and file validation, making it indispensable for building robust APIs and type-safe frontend applications with high performance and minimal bundle sizes.\n\n## Key Features\n\n01Tree-shakable functional API for optimized bundle sizes\n\n02Comprehensive runtime validation for objects, arrays, and primitives\n\n03Discriminated unions for type-safe API response handling\n\n04Static type inference directly from schema definitions\n\n050 GitHub stars\n\n06Data transformation pipelines and custom refinements\n\n## Use Cases\n\n01Implementing complex multi-step form validation with custom error messaging\n\n02Parsing environment variables into type-safe application configuration\n\n03Validating incoming API request bodies and external service payloads\n\n1. ### Join our newsletter\n\n\n\n Stay in the loop with AI news, fresh resources, and community updates delivered straight to your inbox.\n\n\n\n Join now →\n\n\nZod v4 Schema Validation - Claude Code Skill","metadata":{"og:url":"https://mcpmarket.com/tools/skills/zod-schema-validation","og:description":"Implement robust runtime validation and static type inference using Zod v4. Enhance your Claude Code workflow with production-ready schema patterns.","og:site_name":"MCP Market","robots":"index, follow","viewport":["width=device-width, initial-scale=1.0","width=device-width, initial-scale=1"],"language":"en","og:image:width":"1200","title":"Zod v4 Schema Validation - Claude Code Skill","og:title":"Zod v4 Schema Validation - Claude Code Skill","twitter:description":"Implement robust runtime validation and static type inference using Zod v4. Enhance your Claude Code workflow with production-ready schema patterns.","next-size-adjust":"","og:image":"https://mcpmarket.com/api/og?title=Zod%20Schema%20Validation","og:image:height":"630","twitter:title":"Zod v4 Schema Validation - Claude Code Skill","og:locale":"en","googlebot":"index, follow, max-video-preview:-1, max-image-preview:large, max-snippet:-1","ogSiteName":"MCP Market","description":"Implement robust runtime validation and static type inference using Zod v4. Enhance your Claude Code workflow with production-ready schema patterns.","og:type":"website","og:image:alt":"Zod Schema Validation","twitter:card":"summary_large_image","twitter:image":"https://mcpmarket.com/api/og?title=Zod%20Schema%20Validation","favicon":"https://mcpmarket.com/favicon.svg","scrapeId":"019d3953-b08b-75e8-8dc0-e6fc267cb9c5","sourceURL":"https://mcpmarket.com/tools/skills/zod-schema-validation","url":"https://mcpmarket.com/tools/skills/zod-schema-validation","statusCode":200,"contentType":"text/html; charset=utf-8","timezone":"America/New_York","proxyUsed":"basic","cacheState":"miss","indexId":"fe7836d4-01cd-4e21-b7d0-6c85239ffbca","creditsUsed":1}},{"url":"https://github.com/modelcontextprotocol/typescript-sdk/issues/283","title":"Support JSON schema in addition to zod · Issue #283","description":"Code-generated tools from OpenAPI specs; Integration with existing JSON Schema tooling; Compatibility with other validation libraries beyond Zod.","position":2,"category":"github","markdown":"[Skip to content](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#start-of-content)\n\nYou signed in with another tab or window. [Reload](https://github.com/modelcontextprotocol/typescript-sdk/issues/283) to refresh your session.You signed out in another tab or window. [Reload](https://github.com/modelcontextprotocol/typescript-sdk/issues/283) to refresh your session.You switched accounts on another tab or window. [Reload](https://github.com/modelcontextprotocol/typescript-sdk/issues/283) to refresh your session.Dismiss alert\n\n{{ message }}\n\n[modelcontextprotocol](https://github.com/modelcontextprotocol)/ **[typescript-sdk](https://github.com/modelcontextprotocol/typescript-sdk)** Public\n\n- [Notifications](https://github.com/login?return_to=%2Fmodelcontextprotocol%2Ftypescript-sdk) You must be signed in to change notification settings\n- [Fork\\\\\n1.7k](https://github.com/login?return_to=%2Fmodelcontextprotocol%2Ftypescript-sdk)\n- [Star\\\\\n12k](https://github.com/login?return_to=%2Fmodelcontextprotocol%2Ftypescript-sdk)\n\n\n# Support JSON schema in addition to zod\\#283\n\n[New issue](https://github.com/login?return_to=https://github.com/modelcontextprotocol/typescript-sdk/issues/283)\n\nCopy link\n\n[New issue](https://github.com/login?return_to=https://github.com/modelcontextprotocol/typescript-sdk/issues/283)\n\nCopy link\n\nOpen\n\nOpen\n\n[Support JSON schema in addition to zod](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#top)#283\n\nCopy link\n\nLabels\n\n[P2Moderate issues affecting some users, edge cases, potentially valuable feature](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=state%3Aopen%20label%3A%22P2%22) Moderate issues affecting some users, edge cases, potentially valuable feature [enhancementRequest for a new feature that's not currently supported](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=state%3Aopen%20label%3A%22enhancement%22) Request for a new feature that's not currently supported\n\nMilestone\n\n[v2](https://github.com/modelcontextprotocol/typescript-sdk/milestone/6)\n\n[![@psclkhoury](https://avatars.githubusercontent.com/u/9846892?u=a26aa6f4958f7ce7003d009ca9b6fff2b98c6067&v=4&size=80)](https://github.com/psclkhoury)\n\n## Description\n\n[![@psclkhoury](https://avatars.githubusercontent.com/u/9846892?u=a26aa6f4958f7ce7003d009ca9b6fff2b98c6067&v=4&size=48)](https://github.com/psclkhoury)\n\n[psclkhoury](https://github.com/psclkhoury)\n\nopened [on Apr 7, 2025on Apr 7, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issue-2978093736) · edited by [psclkhoury](https://github.com/psclkhoury)\n\nEdits\n\nIssue body actions\n\nWhy dont you add support for jsonschema in addition to zod. A lot of projects already have jsonshemas defined and you are converting internally from zod to jsonschema.\n\n👍React with 👍34ethanlee16, ahasseyp-paragon, richardbidin-paragon, asprouse, grimmerk and 29 more\n\n## Activity\n\n[![](https://avatars.githubusercontent.com/u/9846892?s=64&u=a26aa6f4958f7ce7003d009ca9b6fff2b98c6067&v=4)psclkhoury](https://github.com/psclkhoury)\n\nadded\n\n[enhancementRequest for a new feature that's not currently supported](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=state%3Aopen%20label%3A%22enhancement%22) Request for a new feature that's not currently supported\n\n[on Apr 7, 2025on Apr 7, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#event-17161066429)\n\n[![](https://avatars.githubusercontent.com/u/9846892?s=64&u=a26aa6f4958f7ce7003d009ca9b6fff2b98c6067&v=4)psclkhoury](https://github.com/psclkhoury)\n\nchanged the title ~~\\[-\\]Support JSON schema in addition to sod\\[/-\\]~~\\[+\\]Support JSON schema in addition to zod\\[/+\\] [on Apr 11, 2025on Apr 11, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#event-17218761087)\n\n[![](https://avatars.githubusercontent.com/u/1584370?s=64&v=4)kombucha](https://github.com/kombucha)\n\nmentioned this [on Apr 28, 2025on Apr 28, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#event-2385206959)\n\n- [feat(server): support json schema to define tool parameters #423](https://github.com/modelcontextprotocol/typescript-sdk/pull/423)\n\n\n[![ThomasAribart](https://avatars.githubusercontent.com/u/38014240?u=c31465b30b4f450fbbc6b2be7943887428d406cb&v=4&size=80)](https://github.com/ThomasAribart)\n\n### ThomasAribart commented on May 26, 2025on May 26, 2025\n\n[![@ThomasAribart](https://avatars.githubusercontent.com/u/38014240?u=c31465b30b4f450fbbc6b2be7943887428d406cb&v=4&size=48)](https://github.com/ThomasAribart)\n\n[ThomasAribart](https://github.com/ThomasAribart)\n\n[on May 26, 2025on May 26, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-2909006051)\n\nMore actions\n\nI guess this is for type-safety/devX. However there are tools for type inference like [https://github.com/ThomasAribart/json-schema-to-ts](https://github.com/ThomasAribart/json-schema-to-ts).\n\n👍React with 👍1sinclairzx81\n\n[![tianlinle](https://avatars.githubusercontent.com/u/5206898?v=4&size=80)](https://github.com/tianlinle)\n\n### tianlinle commented on Jun 22, 2025on Jun 22, 2025\n\n[![@tianlinle](https://avatars.githubusercontent.com/u/5206898?v=4&size=48)](https://github.com/tianlinle)\n\n[tianlinle](https://github.com/tianlinle)\n\n[on Jun 22, 2025on Jun 22, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-2994734918)\n\nMore actions\n\nI'm also looking forward to JSON-Schema. [@ThomasAribart](https://github.com/ThomasAribart) It's not for type-safety, it's the same goal as zod. Right now I'm using [ajv](https://www.npmjs.com/package/ajv) to validate any JSON data by JSON-Schema. Tool calling in most LLMs is using JSON-schema to describe the args of a function, so I think it's helpful if MCP also can support JSON-Schema in addition to zod.\n\n👍React with 👍1bahatron\n\n[![finom](https://avatars.githubusercontent.com/u/1082083?u=29e91400dbd4a9c217048a8f59562c4f740498e6&v=4&size=80)](https://github.com/finom)\n\n### finom commented on Jun 28, 2025on Jun 28, 2025\n\n[![@finom](https://avatars.githubusercontent.com/u/1082083?u=29e91400dbd4a9c217048a8f59562c4f740498e6&v=4&size=48)](https://github.com/finom)\n\n[finom](https://github.com/finom)\n\n[on Jun 28, 2025on Jun 28, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-3015383861)\n\nMore actions\n\nAfter creating [vercel/mcp-handler#65](https://github.com/vercel/mcp-handler/issues/65) and digging thru the source codes I found this repository. I'm using `@vercel/mcp-adapter` and **all I have is JSON Schema**. My attempts to convert it to Zod were unsuccessful.\n\nIt seems like [the SDK supports Zod 3 only](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/server/mcp.ts#L119-L123) with legacy [zod-to-json-schema](https://github.com/StefanTerdell/zod-to-json-schema), even though there is a plenty of libraries, including Zod 4, Valibot and other libraries that implement [Standard Schema](https://github.com/standard-schema/standard-schema) and their own `toJSONSchema` first-, second-, or 3rd-party [implementation](https://www.npmjs.com/package/@valibot/to-json-schema). IMO, such an important SDK should be JSON Schema-first, instead of one-legacy-library-first, even though Zod 3 is still maintained.\n\nAjv has a nice [TypeScript library](https://ajv.js.org/guide/typescript.html) that might be a great fit to support JSON Schemas. At this case the SDK can support basically all modern validation libraries, instead of one specific version of one specific library.\n\n👍React with 👍8psclkhoury, lin72h, tianlinle, dehli, zougeren and 3 more\n\n[![Rutledge](https://avatars.githubusercontent.com/u/619972?v=4&size=80)](https://github.com/Rutledge)\n\n### Rutledge commented on Jun 28, 2025on Jun 28, 2025\n\n[![@Rutledge](https://avatars.githubusercontent.com/u/619972?v=4&size=48)](https://github.com/Rutledge)\n\n[Rutledge](https://github.com/Rutledge)\n\n[on Jun 28, 2025on Jun 28, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-3016034013) · edited by [Rutledge](https://github.com/Rutledge)\n\nEdits\n\nMore actions\n\n+1 for JSON Schema support. I'm currently blocked by this when using Stainless-generated MCP\n\ntools.\n\nStainless (and many other code generators) produce plain JSON schemas from OpenAPI specs.\n\nWhen these are passed to `server.tool()`, the MCP SDK tries to run `zodToJsonSchema()` on\n\nthem, which fails because they're already JSON schemas, not Zod schemas.\n\nThis results in:\n\n- Parameters not showing up in MCP Inspector\n- Tools receiving `undefined` for all parameters\n- The actual parameter schema appearing in the wrong place (e.g., in `annotations` instead of\n\n`inputSchema`)\n\nSupporting plain JSON schemas would enable:\n\n1. Code-generated tools from OpenAPI specs\n2. Integration with existing JSON Schema tooling\n3. Compatibility with other validation libraries beyond Zod\n\nRelated issue in Vercel adapter: [vercel/mcp-handler#65](https://github.com/vercel/mcp-handler/issues/65)\n\n👍React with 👍3zougeren, AMoreaux and sinclairzx81\n\n[![priolo](https://avatars.githubusercontent.com/u/402921?v=4&size=80)](https://github.com/priolo)\n\n### priolo commented on Jul 27, 2025on Jul 27, 2025\n\n[![@priolo](https://avatars.githubusercontent.com/u/402921?v=4&size=48)](https://github.com/priolo)\n\n[priolo](https://github.com/priolo)\n\n[on Jul 27, 2025on Jul 27, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-3124148106)\n\nMore actions\n\n+1 for JSON Schema support.\n\nTransforming from JSON Schema to ZOD is not easy.\n\n👍React with 👍1emaciel10\n\n[![emaciel10](https://avatars.githubusercontent.com/u/11020939?v=4&size=80)](https://github.com/emaciel10)\n\n### emaciel10 commented on Aug 6, 2025on Aug 6, 2025\n\n[![@emaciel10](https://avatars.githubusercontent.com/u/11020939?v=4&size=48)](https://github.com/emaciel10)\n\n[emaciel10](https://github.com/emaciel10)\n\n[on Aug 6, 2025on Aug 6, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-3160545630)\n\nMore actions\n\nCompletely agreed, going from json schema to a clean zod schema has been a pain for us so having MCPServer work with just json schema would be great!\n\n[![](https://avatars.githubusercontent.com/u/820092?s=64&u=31a3264d135e51d4a9425b7dcf1aa8c4077fe7ca&v=4)jake-danton](https://github.com/jake-danton)\n\nmentioned this [on Sep 2, 2025on Sep 2, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#event-3186693303)\n\n- [Migrating to Zod v4, marking as peer dependency, and removing zod-to-json-schema #914](https://github.com/modelcontextprotocol/typescript-sdk/pull/914)\n\n\n[![bahatron](https://avatars.githubusercontent.com/u/19673942?u=f02ba06448bb84210094c15d8d1cd87b7858e5e8&v=4&size=80)](https://github.com/bahatron)\n\n### bahatron commented on Sep 24, 2025on Sep 24, 2025\n\n[![@bahatron](https://avatars.githubusercontent.com/u/19673942?u=f02ba06448bb84210094c15d8d1cd87b7858e5e8&v=4&size=48)](https://github.com/bahatron)\n\n[bahatron](https://github.com/bahatron)\n\n[on Sep 24, 2025on Sep 24, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-3327080080)\n\nMore actions\n\nWe use [https://github.com/sinclairzx81/typebox](https://github.com/sinclairzx81/typebox) for types, the runtime object is a normal valid jsonschema object. Would be nice to be able to give it valid jsonschema coming from typebox\n\n👍React with 👍1dancrumb\n\n[![logseq-cldwalker](https://avatars.githubusercontent.com/u/97210743?u=788fad4d45810c20df1d1cfca09edfe6fe85da21&v=4&size=80)](https://github.com/logseq-cldwalker)\n\n### logseq-cldwalker commented on Sep 25, 2025on Sep 25, 2025\n\n[![@logseq-cldwalker](https://avatars.githubusercontent.com/u/97210743?u=788fad4d45810c20df1d1cfca09edfe6fe85da21&v=4&size=48)](https://github.com/logseq-cldwalker)\n\n[logseq-cldwalker](https://github.com/logseq-cldwalker)\n\n[on Sep 25, 2025on Sep 25, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-3335673704)\n\nMore actions\n\nWe're using this library from clojurescript and already have json schemas created by [https://github.com/metosin/malli](https://github.com/metosin/malli). We'd love to be able to reuse these json schemas without having to maintain a separate zod version of them\n\n[![dan-kwiat](https://avatars.githubusercontent.com/u/5648607?v=4&size=80)](https://github.com/dan-kwiat)\n\n### dan-kwiat commented on Oct 5, 2025on Oct 5, 2025\n\n[![@dan-kwiat](https://avatars.githubusercontent.com/u/5648607?v=4&size=48)](https://github.com/dan-kwiat)\n\n[dan-kwiat](https://github.com/dan-kwiat)\n\n[on Oct 5, 2025on Oct 5, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-3368985570)\n\nMore actions\n\nI agree it would be nice to have the option of using JSON Schema in the helpers `registerTool`, `registerPrompt` etc. and I'd be happy to implement it. But FYI you can already work with JSON Schema through the low-level server:\n\n```\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\"\nimport {\n ListToolsRequestSchema,\n CallToolRequestSchema,\n} from \"@modelcontextprotocol/sdk/types.js\"\n\nconst server = new McpServer(\n {\n name: \"example-server\",\n version: \"1.0.0\",\n },\n {\n capabilities: {\n tools: {\n listChanged: false,\n },\n },\n }\n)\n\nserver.server.setRequestHandler(ListToolsRequestSchema, async () => {\n return {\n tools: [\\\n {\\\n name: \"echo\",\\\n title: \"Echo Tool\",\\\n description: \"Echoes back the provided message\",\\\n inputSchema: {\\\n type: \"object\",\\\n properties: {\\\n message: {\\\n type: \"string\",\\\n description: \"The message to echo back\",\\\n },\\\n },\\\n required: [\"message\"],\\\n },\\\n outputSchema: {\\\n type: \"object\",\\\n properties: {\\\n echo: { type: \"string\", description: \"The echoed message\" },\\\n },\\\n required: [\"echo\"],\\\n },\\\n },\\\n ],\n }\n})\n\nserver.server.setRequestHandler(CallToolRequestSchema, async (request) => {\n if (request.params.name !== \"echo\") {\n throw new Error(`Unknown tool: ${request.params.name}`)\n }\n\n const args = request.params.arguments as any\n\n // Validate args against inputSchema here\n\n const output = { echo: `Tool echo: ${args.message}` }\n\n return {\n content: [{ type: \"text\", text: JSON.stringify(output) }],\n structuredContent: output,\n }\n})\n```\n\n[![](https://avatars.githubusercontent.com/u/3823880?s=64&u=fa1e7098518f857dc83940d8f568b107d476a7fd&v=4)felixweinberger](https://github.com/felixweinberger)\n\nadded\n\n[P3Nice to haves, rare edge cases](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=state%3Aopen%20label%3A%22P3%22) Nice to haves, rare edge cases\n\n[P2Moderate issues affecting some users, edge cases, potentially valuable feature](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=state%3Aopen%20label%3A%22P2%22) Moderate issues affecting some users, edge cases, potentially valuable feature\n\nand removed\n\n[P3Nice to haves, rare edge cases](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=state%3Aopen%20label%3A%22P3%22) Nice to haves, rare edge cases\n\n[on Nov 3, 2025on Nov 3, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#event-20677746349)\n\n[![finom](https://avatars.githubusercontent.com/u/1082083?u=29e91400dbd4a9c217048a8f59562c4f740498e6&v=4&size=80)](https://github.com/finom)\n\n### finom commented on Nov 14, 2025on Nov 14, 2025\n\n[![@finom](https://avatars.githubusercontent.com/u/1082083?u=29e91400dbd4a9c217048a8f59562c4f740498e6&v=4&size=48)](https://github.com/finom)\n\n[finom](https://github.com/finom)\n\n[on Nov 14, 2025on Nov 14, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-3533724607)\n\nMore actions\n\nI'm working on a project that requires supporting a lot of libraries out of the box but also convertion to JSON Schema. There is my proposal for solving this problem.\n\nThere are two key limitations in today's ecosystem:\n\n### 1\\. Standard Schema does **not** provide `toJSONSchema`\n\nThis is intentional to keep package sizes small. Libraries like Valibot ship JSON Schema support as separate packages (e.g., `@valibot/to-json-schema`).\n\n### 2\\. JSON Schema validators do **not** understand Standard Schema\n\nThere is no JSON Schema validator that accepts Standard Schema directly.\n\n* * *\n\n## ✅ Proposed Solution\n\n### 1\\. A new Ajv-based Standard Schema implementation\n\nIntroduce a function that implements the Standard Schema interface using **Ajv** internally.\n\n```\nimport { ajvStandardSchema } from \"standard-schema-ajv\"; // doesn't exist yet\nconst ajvStandard = ajvStandardSchema<MyData>({\n type: \"object\",\n properties: {\n foo: { type: \"integer\" },\n bar: { type: \"string\", nullable: true }\n },\n required: [\"foo\"],\n additionalProperties: false\n});\n\najvStandard.schema; // The same JSON Schema above\n\najvStandard['~standard'].validate({ foo: 123 });\n```\n\n### 2\\. A universal adapter\n\nIntroduce a function that wraps any Standard Schema implementation and adds JSON Schema conversion capabilities.\n\n```\nimport {\n createStandardSchemaWithJsonSchemaValidation\n} from \"standard-schema-to-json-schema\"; // doesn't exist yet\n\n// Zod example\nimport { z } from \"zod\";\n\nconst validator = createStandardSchemaWithJsonSchemaValidation({\n toJSONSchema: (model) => z.toJSONSchema(model),\n});\n\nconst model = validator(\n z.object({\n foo: z.number().int(),\n bar: z.string().nullable()\n })\n);\n\nmodel['~standard'].validate({ foo: 123 });\nmodel.toJSONSchema();\n\n\n// Ajv example\n\nimport { ajvStandardSchema } from \"standard-schema-ajv\"; // doesn't exist yet\n\nconst validator = createStandardSchemaWithJsonSchemaValidation({\n toJSONSchema: (model) => model.schema,\n});\n\nconst model = validator(\n ajvStandardSchema({\n type: \"object\",\n properties: {\n foo: { type: \"integer\" },\n bar: { type: \"string\", nullable: true }\n },\n required: [\"foo\"],\n additionalProperties: false\n })\n);\n\nmodel['~standard'].validate({ foo: 123 });\nmodel.toJSONSchema();\n\n// Valibot example\nimport { toJsonSchema } from '@valibot/to-json-schema';\nimport * as v from \"valibot\";\n\nconst validator = createStandardSchemaWithJsonSchemaValidation({\n toJSONSchema: (model) => toJsonSchema(model),\n});\n\nconst model = validator(\n v.object({\n email: v.string(),\n password: v.string()\n })\n);\n\nmodel['~standard'].validate({\n email: \"user@example.com\",\n password: \"securepassword\"\n});\n\nmodel.toJSONSchema();\n```\n\n* * *\n\nIn the context of MCP SDK this may look like:\n\n```\nconst validator = createStandardSchemaWithJsonSchemaValidation({ toJSONSchema: ... });\n\n// Zod example\nserver.registerTool(\n 'add',\n {\n title: 'Addition Tool',\n description: 'Add two numbers',\n inputSchema: { a: validator(z.number()), b: validator(z.number()) },\n outputSchema: { result: validator(z.number()) }\n },\n async ({ a, b }) => {\n // ...\n }\n);\n\n// Ajv example (raw JSON schema)\nserver.registerTool(\n 'add',\n {\n title: 'Addition Tool',\n description: 'Add two numbers',\n inputSchema: { a: validator({ type: \"integer\" }), b: validator({ type: \"integer\" }) },\n outputSchema: { result: validator({ type: \"integer\" }) }\n },\n async ({ a, b }) => {\n // ...\n }\n);\n\n// Valibot example\nserver.registerTool(\n 'add',\n {\n title: 'Addition Tool',\n description: 'Add two numbers',\n inputSchema: { a: validator(v.number()), b: validator(v.number()) },\n outputSchema: { result: validator(v.number()) }\n },\n async ({ a, b }) => {\n // ...\n }\n);\n```\n\nI could take care of implementing this if the proposal looks good to you. Let me know your thoughts.\n\n[![](https://avatars.githubusercontent.com/u/655541?s=64&u=7ea190e46681a589be88ba8dc2b4c4bccea92db9&v=4)KKonstantinov](https://github.com/KKonstantinov)\n\nadded this to the [v2](https://github.com/modelcontextprotocol/typescript-sdk/milestone/6) milestone [on Dec 4, 2025on Dec 4, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#event-21376179641)\n\n[![KKonstantinov](https://avatars.githubusercontent.com/u/655541?u=7ea190e46681a589be88ba8dc2b4c4bccea92db9&v=4&size=80)](https://github.com/KKonstantinov)\n\n### KKonstantinov commented on Dec 4, 2025on Dec 4, 2025\n\n[![@KKonstantinov](https://avatars.githubusercontent.com/u/655541?u=7ea190e46681a589be88ba8dc2b4c4bccea92db9&v=4&size=48)](https://github.com/KKonstantinov)\n\n[KKonstantinov](https://github.com/KKonstantinov)\n\n[on Dec 4, 2025on Dec 4, 2025](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#issuecomment-3615297606)\n\nContributor\n\nMore actions\n\nAdding this to [#809](https://github.com/modelcontextprotocol/typescript-sdk/issues/809)\n\n❤React with ❤1noahc3👀React with 👀1lin72h\n\n[![](https://avatars.githubusercontent.com/u/51397083?s=64&u=662c12eb819810138fc0542c6a5fdbdbf208a710&v=4)Railly](https://github.com/Railly)\n\nmentioned this [on Jan 8on Jan 8, 2026](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#event-4323346707)\n\n- [feat: Add Clerk MCP server to eval suite clerk/clerk-evals#30](https://github.com/clerk/clerk-evals/pull/30)\n\n\n[![](https://avatars.githubusercontent.com/u/3823880?s=64&u=fa1e7098518f857dc83940d8f568b107d476a7fd&v=4)felixweinberger](https://github.com/felixweinberger)\n\nmentioned this [on Jan 29on Jan 29, 2026](https://github.com/modelcontextprotocol/typescript-sdk/issues/283#event-4526360560)\n\n- [Make zod optional, allow generic schema-checking functions to be specified #1019](https://github.com/modelcontextprotocol/typescript-sdk/issues/1019)\n\n\n[Sign up for free](https://github.com/signup?return_to=https://github.com/modelcontextprotocol/typescript-sdk/issues/283)**to join this conversation on GitHub.** Already have an account? [Sign in to comment](https://github.com/login?return_to=https://github.com/modelcontextprotocol/typescript-sdk/issues/283)\n\n## Metadata\n\n## Metadata\n\n### Assignees\n\nNo one assigned\n\n### Labels\n\n[P2Moderate issues affecting some users, edge cases, potentially valuable feature](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=state%3Aopen%20label%3A%22P2%22) Moderate issues affecting some users, edge cases, potentially valuable feature [enhancementRequest for a new feature that's not currently supported](https://github.com/modelcontextprotocol/typescript-sdk/issues?q=state%3Aopen%20label%3A%22enhancement%22) Request for a new feature that's not currently supported\n\n### Type\n\nNo type\n\n### Projects\n\nNo projects\n\n### Milestone\n\n- [v2No due date](https://github.com/modelcontextprotocol/typescript-sdk/milestone/6)\n\n### Relationships\n\nNone yet\n\n### Development\n\nCode with agent mode\n\nSelect code repository\n\n- [feat(server): support json schema to define tool parametersmodelcontextprotocol/typescript-sdk](https://github.com/modelcontextprotocol/typescript-sdk/pull/423)\n\n### Participants\n\n[![@priolo](https://avatars.githubusercontent.com/u/402921?s=64&v=4)](https://github.com/priolo)[![@Rutledge](https://avatars.githubusercontent.com/u/619972?s=64&v=4)](https://github.com/Rutledge)[![@KKonstantinov](https://avatars.githubusercontent.com/u/655541?s=64&u=7ea190e46681a589be88ba8dc2b4c4bccea92db9&v=4)](https://github.com/KKonstantinov)[![@finom](https://avatars.githubusercontent.com/u/1082083?s=64&u=29e91400dbd4a9c217048a8f59562c4f740498e6&v=4)](https://github.com/finom)[![@felixweinberger](https://avatars.githubusercontent.com/u/3823880?s=64&u=fa1e7098518f857dc83940d8f568b107d476a7fd&v=4)](https://github.com/felixweinberger)\n\n+7\n\n## Issue actions\n\nYou cant perform that action at this time.","metadata":{"title":"Support JSON schema in addition to zod · Issue #283 · modelcontextprotocol/typescript-sdk","ogTitle":"Support JSON schema in addition to zod · Issue #283 · modelcontextprotocol/typescript-sdk","og:description":"Why dont you add support for jsonschema in addition to zod. A lot of projects already have jsonshemas defined and you are converting internally from zod to jsonschema.","visitor-payload":"eyJyZWZlcnJlciI6Imh0dHBzOi8vd3d3Lmdvb2dsZS5jb20vIiwicmVxdWVzdF9pZCI6IjgwQjk6MzE4NTA6NEE3MEMyOjVGQzczMzo2OUM5MEIyRiIsInZpc2l0b3JfaWQiOiI0ODg1Mzk4MjAwMDA3NTkyNzUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=","browser-errors-url":"https://api.github.com/_private/browser/errors","user-login":"","turbo-cache-control":"no-preview","language":"en","browser-stats-url":"https://api.github.com/_private/browser/stats","fetch-nonce":"v2:dc0e214e-5f96-44c7-8fca-121b20a6580a","disable-turbo":"false","octolytics-dimension-user_login":"modelcontextprotocol","viewport":"width=device-width","release":"51d2e33e3d1e4839c3ced5f8e35c7a47d3a60f32","route-action":"issue_layout","html-safe-nonce":"2f39a6e78685e16e3cd5d4e84c7b0edb18eb8c80d2b70f2b8c3cebbad9b37d86","hovercard-subject-tag":"issue:2978093736","turbo-body-classes":"logged-out env-production page-responsive","twitter:card":"summary_large_image","twitter:title":"Support JSON schema in addition to zod · Issue #283 · modelcontextprotocol/typescript-sdk","octolytics-dimension-repository_network_root_id":"862578138","og:author:username":"psclkhoury","og:site_name":"GitHub","octolytics-dimension-repository_is_fork":"false","og:image":"https://opengraph.githubassets.com/9bb096683280d17044f9bdac8a60abb47f9e2ae27c28656b3363508b587ad91e/modelcontextprotocol/typescript-sdk/issues/283","octolytics-dimension-repository_nwo":"modelcontextprotocol/typescript-sdk","ogUrl":"https://github.com/modelcontextprotocol/typescript-sdk/issues/283","og:title":"Support JSON schema in addition to zod · Issue #283 · modelcontextprotocol/typescript-sdk","og:url":"https://github.com/modelcontextprotocol/typescript-sdk/issues/283","ui-target":"full","ogImage":"https://opengraph.githubassets.com/9bb096683280d17044f9bdac8a60abb47f9e2ae27c28656b3363508b587ad91e/modelcontextprotocol/typescript-sdk/issues/283","github-keyboard-shortcuts":"repository,issues,copilot","hostname":"github.com","expected-hostname":"github.com","og:image:width":"1200","current-catalog-service-hash":"81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114","description":"Why dont you add support for jsonschema in addition to zod. A lot of projects already have jsonshemas defined and you are converting internally from zod to jsonschema.","octolytics-dimension-repository_public":"true","color-scheme":"light dark","visitor-hmac":"e52767bec016e0f3d8fc02a1b728fb1f836f4670637efe6ac18ec419cc9579f5","theme-color":"#1e2327","twitter:image":"https://opengraph.githubassets.com/9bb096683280d17044f9bdac8a60abb47f9e2ae27c28656b3363508b587ad91e/modelcontextprotocol/typescript-sdk/issues/283","route-controller":"voltron_issues_fragments","og:type":"object","octolytics-dimension-repository_network_root_nwo":"modelcontextprotocol/typescript-sdk","og:image:height":"600","octolytics-dimension-repository_id":"862578138","fb:app_id":"1401488693436528","ogSiteName":"GitHub","analytics-location":"/<user-name>/<repo-name>/voltron/issues_fragments/issue_layout","og:image:alt":"Why dont you add support for jsonschema in addition to zod. A lot of projects already have jsonshemas defined and you are converting internally from zod to jsonschema.","route-pattern":"/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)","google-site-verification":"Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I","twitter:site":"@github","octolytics-url":"https://collector.github.com/github/collect","twitter:description":"Why dont you add support for jsonschema in addition to zod. A lot of projects already have jsonshemas defined and you are converting internally from zod to jsonschema.","go-import":"github.com/modelcontextprotocol/typescript-sdk git https://github.com/modelcontextprotocol/typescript-sdk.git","apple-itunes-app":"app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/typescript-sdk/283/issue_layout","ogDescription":"Why dont you add support for jsonschema in addition to zod. A lot of projects already have jsonshemas defined and you are converting internally from zod to jsonschema.","octolytics-dimension-user_id":"182288589","request-id":"80B9:31850:4A70C2:5FC733:69C90B2F","favicon":"https://github.githubassets.com/favicons/favicon.svg","scrapeId":"019d3953-b08b-75e8-8dc0-e82ad2bf68d4","sourceURL":"https://github.com/modelcontextprotocol/typescript-sdk/issues/283","url":"https://github.com/modelcontextprotocol/typescript-sdk/issues/283","statusCode":200,"contentType":"text/html; charset=utf-8","timezone":"America/New_York","proxyUsed":"basic","cacheState":"miss","indexId":"515988d3-14b9-4180-b4bd-c415164888bb","creditsUsed":1}},{"url":"https://dev.to/dataformathub/zod-vs-yup-vs-typebox-the-ultimate-schema-validation-guide-for-2025-1l4l","title":"Zod vs Yup vs TypeBox: The Ultimate Schema Validation ...","description":"Explore these DataFormatHub tools related to this topic: JSON Formatter - Format JSON schemas; JSON to TypeScript - Generate types from schema ...","position":3,"markdown":"## The Evolving Landscape of Schema Validation: A Deep Dive into Zod, Yup, TypeBox, and JSON Schema\n\nAs developers, we understand that data is the lifeblood of modern applications. Ensuring that this data is consistently structured, valid, and type-safe across various layers of our stack is no longer a luxury but a fundamental requirement. From API contracts and database interactions to frontend forms and configuration files, robust schema validation acts as a critical guardrail, preventing runtime errors and bolstering application resilience.\n\n![Mermaid Diagram](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmermaid.ink%2Fimg%2FeyJjb2RlIjoiZ3JhcGggVERcbiAgQVtcIvCfk6UgSW5wdXQgRGF0YVwiXSAtLT4gQntcIvCflI0gU2NoZW1hIENoZWNrXCJ9XG4gIEIgLS0gXCLinIUgVmFsaWRcIiAtLT4gQ1tcIuKame%2B4jyBQcm9jZXNzIERhdGFcIl1cbiAgQiAtLSBcIvCfmqggSW52YWxpZFwiIC0tPiBEW1wi8J%2BaqCBSZXR1cm4gRXJyb3JcIl1cbiAgQyAtLT4gRVtcIvCfj4EgU3VjY2Vzc1wiXVxuICBEIC0tPiBFXG4gIGNsYXNzRGVmIGlucHV0IGZpbGw6IzYzNjZmMSxjb2xvcjojZmZmXG4gIGNsYXNzRGVmIHByb2Nlc3MgZmlsbDojM2I4MmY2LGNvbG9yOiNmZmZcbiAgY2xhc3NEZWYgc3VjY2VzcyBmaWxsOiMyMmM1NWUsY29sb3I6I2ZmZlxuICBjbGFzc0RlZiBlcnJvciBmaWxsOiNlZjQ0NDQsY29sb3I6I2ZmZlxuICBjbGFzc0RlZiBkZWNpc2lvbiBmaWxsOiM4YjVjZjYsY29sb3I6I2ZmZlxuICBjbGFzc0RlZiBlbmRwb2ludCBmaWxsOiMxZTI5M2IsY29sb3I6I2ZmZlxuICBjbGFzcyBBIGlucHV0XG4gIGNsYXNzIEIgZGVjaXNpb25cbiAgY2xhc3MgQyBwcm9jZXNzXG4gIGNsYXNzIEQgZXJyb3JcbiAgY2xhc3MgRSBlbmRwb2ludCIsIm1lcm1haWQiOnsidGhlbWUiOiJkYXJrIn0sImJnQ29sb3IiOiIhdHJhbnNwYXJlbnQifQ%3D%3D)\n\nThe past couple of years, leading up to late 2025, have seen continuous, pragmatic evolution in the JavaScript/TypeScript schema validation ecosystem. We've moved beyond mere basic checks to sophisticated type inference, enhanced performance, and more expressive ways to define complex data structures. Let me walk you through the recent developments and practical applications of JSON Schema, Zod, Yup, and TypeBox, offering hands-on guidance for integrating these powerful tools into your projects.\n\n## The Foundation: JSON Schema's Enduring Power and Recent Refinements\n\nJSON Schema stands as the declarative backbone for describing JSON data structures, serving as a language-agnostic contract for data exchange. It's a specification, not a library, but its influence is ubiquitous, underpinning tools like OpenAPI and AsyncAPI. Understanding how it compares to other formats is vital, as explored in our guide on [JSON vs YAML vs JSON5: The Truth About Data Formats in 2025](https://dev.to/blog/json-vs-yaml-vs-json5-the-truth-about-data-formats-in-2025-ewv).\n\n### How It Works: Declarative Data Contracts\n\nAt its core, JSON Schema allows you to define the shape and constraints of your JSON data using a JSON-based format. You declare types (e.g., `object`, `array`, `string`, `number`), specify required properties, define patterns for strings, set ranges for numbers, and even combine schemas using logical operators like `allOf`, `anyOf`, `oneOf`, and `not`. This declarative approach fosters interoperability, enabling different systems and languages to agree on a common data format. You can use this [JSON Formatter](https://dev.to/utilities/code-formatter) to verify your structure before applying a schema.\n\nFor instance, a simple user schema might define `name` as a required string and `age` as a number within a certain range. This definition isn't tied to any specific programming language; it's a universal blueprint.\n\n### Recent Refinements: Embracing Draft 2020-12 and Enhanced Tooling\n\nThe adoption of newer JSON Schema drafts, particularly Draft 2020-12, has solidified its capabilities for complex scenarios. This draft introduced several robust features that address long-standing challenges in schema definition:\n\n- **`unevaluatedProperties` and `unevaluatedItems`**: These keywords offer more precise control over allowing or disallowing additional properties/items in objects and arrays, respectively, especially when dealing with schema composition (`allOf`, `anyOf`, `oneOf`). Unlike `additionalProperties`, `unevaluatedProperties` considers properties evaluated by _any_ subschema that applied, providing a more robust \"closed\" schema behavior.\n- **Enhanced Conditional Logic (`if`/`then`/`else`)**: While present in earlier drafts, the 2020-12 draft clarifies and refines its behavior, making it more predictable for defining rules that depend on the value of other fields.\n- **`minContains`/`maxContains`**: These keywords, alongside `contains`, provide finer-grained control over arrays, allowing you to specify not just _whether_ an array contains an item matching a subschema, but also the minimum and maximum number of such items.\n\nBeyond the specification, the JSON Schema community has been actively working on improving tooling and stability. Efforts are underway to finalize a \"stable\" release, focusing on language clarity and a formal spec development lifecycle. Furthermore, projects like the JSON Schema Language Server are expanding functionality to support recent drafts, offering inline diagnostics, semantic highlighting, and code completion, making schema authoring more efficient. The development of linting rules and autofix implementations for JSON Schema CLI tools also streamlines schema maintenance and ensures consistency across versions.\n\nHere's exactly how to define a schema using some of these advanced features:\n\n```\n{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://example.com/schemas/userProfile.schema.json\",\n \"title\": \"User Profile\",\n \"description\": \"Schema for a user's profile, with conditional fields.\",\n \"type\": \"object\",\n \"properties\": {\n \"userId\": {\n \"type\": \"string\",\n \"pattern\": \"^[a-f0-9]{24}$\",\n \"description\": \"Unique identifier for the user.\"\n },\n \"accountType\": {\n \"type\": \"string\",\n \"enum\": [\"individual\", \"business\"],\n \"description\": \"Type of user account.\"\n },\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\"\n },\n \"businessName\": {\n \"type\": \"string\",\n \"minLength\": 3\n },\n \"taxId\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9]{2}-[0-9]{7}$\"\n },\n \"tags\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" },\n \"minItems\": 1,\n \"maxItems\": 5,\n \"description\": \"Up to 5 descriptive tags for the profile.\"\n }\n },\n \"required\": [\"userId\", \"accountType\", \"email\"],\n \"if\": {\n \"properties\": { \"accountType\": { \"const\": \"business\" } },\n \"required\": [\"accountType\"]\n },\n \"then\": {\n \"required\": [\"businessName\", \"taxId\"],\n \"properties\": {\n \"email\": {\n \"format\": \"email\",\n \"description\": \"Business email address.\"\n }\n }\n },\n \"else\": {\n \"properties\": {\n \"businessName\": { \"not\": {} },\n \"taxId\": { \"not\": {} }\n },\n \"required\": []\n },\n \"unevaluatedProperties\": false\n}\n```\n\nEnter fullscreen modeExit fullscreen mode\n\nIn this `userProfile.schema.json`, we use `if`/`then`/`else` to conditionally enforce `businessName` and `taxId` based on `accountType`. The `unevaluatedProperties: false` ensures that no other properties beyond those explicitly defined or conditionally allowed can exist in the validated object, providing a strict schema. The `tags` array uses `minItems` and `maxItems` to control its length.\n\n## Zod: The TypeScript-First Powerhouse with Enhanced Composition\n\nZod has firmly established itself as a go-to library for TypeScript developers seeking robust runtime validation with seamless static type inference. It champions the \"parse, don't validate\" paradigm, ensuring that once data has passed Zod's gauntlet, TypeScript guarantees its shape.\n\n### How It Works: Type-Safe Schema Definitions\n\nZod's appeal lies in its fluent, chainable API that lets you define schemas directly in TypeScript. From these schemas, Zod automatically infers the corresponding TypeScript types, eliminating the need for redundant type declarations. This not only keeps your codebase DRY but also ensures that your runtime validation logic is always perfectly in sync with your static types.\n\n```\nimport { z } from 'zod';\n\nconst userSchema = z.object({\n id: z.string().uuid(),\n name: z.string().min(2).max(50),\n email: z.string().email(),\n age: z.number().int().positive().optional(),\n role: z.enum(['admin', 'editor', 'viewer']).default('viewer'),\n});\n\ntype User = z.infer<typeof userSchema>;\n\nconst validUser: User = userSchema.parse({\n id: 'a1b2c3d4-e5f6-7890-1234-567890abcdef',\n name: 'John Doe',\n email: 'john.doe@example.com',\n});\n```\n\nEnter fullscreen modeExit fullscreen mode\n\n### Recent Developments: Performance, Coercion, and Advanced Refinements\n\nRecent iterations of Zod, notably \"Zod v4\", have brought significant performance enhancements, reporting speedups of ~14x for string parsing and ~6.5x for object parsing. This is a crucial improvement for high-throughput applications where validation sits in the critical path.\n\nBeyond raw speed, Zod has seen practical refinements in its composition API and error reporting:\n\n- **`z.pipe()` for Transformations and Validations**: This powerful method allows you to chain multiple parsing operations, including transformations and validations, in a sequential and type-safe manner.\n- **`z.coerce` for Type Coercion**: A highly practical addition, `z.coerce` simplifies handling inputs that might come in a different type than expected but can be safely converted (e.g., a number sent as a string).\n- **`superRefine` for Complex Cross-Field Validation**: While `refine` is excellent for single-field custom logic, `superRefine` provides a more ergonomic way to implement complex, multi-field, or context-dependent validation logic.\n- **Discriminated Unions**: Zod's robust support for discriminated unions allows for defining schemas where the shape of an object depends on the value of a specific \"discriminator\" field.\n\n\n```\nimport { z } from 'zod';\n\nconst IdSchema = z.string().uuid('Invalid UUID format.');\n\nconst BaseProductSchema = z.object({\n id: IdSchema,\n name: z.string().min(3),\n price: z.coerce.number().positive('Price must be positive.'),\n quantity: z.coerce.number().int().min(0, 'Quantity cannot be negative.'),\n});\n\nconst DigitalProductSchema = BaseProductSchema.extend({\n type: z.literal('digital'),\n downloadUrl: z.string().url('Invalid download URL.'),\n platform: z.enum(['web', 'mobile', 'desktop']).optional(),\n});\n\nconst PhysicalProductSchema = BaseProductSchema.extend({\n type: z.literal('physical'),\n weightKg: z.coerce.number().positive('Weight must be positive.').optional(),\n dimensionsCm: z.object({\n length: z.coerce.number().positive(),\n width: z.coerce.number().positive(),\n height: z.coerce.number().positive(),\n }).optional(),\n});\n\nconst ProductSchema = z.discriminatedUnion('type', [\\\n DigitalProductSchema,\\\n PhysicalProductSchema,\\\n]);\n\nconst OrderSchema = z.object({\n orderId: IdSchema,\n customerEmail: z.string().email(),\n items: z.array(z.object({\n productId: IdSchema,\n orderedQuantity: z.coerce.number().int().min(1, 'Ordered quantity must be at least 1.'),\n })).min(1, 'Order must contain at least one item.'),\n deliveryDate: z.string().datetime({ offset: true }).optional(),\n}).superRefine((data, ctx) => {\n const hasPhysicalProduct = data.items.some(item => item.productId.startsWith('physical'));\n if (hasPhysicalProduct && !data.deliveryDate) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Delivery date is required for orders containing physical products.',\n path: ['deliveryDate'],\n });\n }\n}).transform((data) => {\n return {\n ...data,\n customerEmail: data.customerEmail.toLowerCase(),\n processedAt: new Date().toISOString(),\n };\n});\n```\n\nEnter fullscreen modeExit fullscreen mode\n\n## Yup: Mature, Flexible, and Steadily Evolving Error Handling\n\nYup is a battle-tested schema validation library, particularly popular in the React ecosystem due to its seamless integration with form libraries like Formik and React Hook Form. It prioritizes developer experience with a readable, chainable API and a strong focus on customizable error messages.\n\n### How It Works: Chainable Validation Rules\n\nYup's core strength lies in its intuitive API, where you chain validation methods directly onto schema types. This declarative style makes schemas easy to read and understand, centralizing validation logic rather than scattering it throughout your application.\n\n```\nimport * as yup from 'yup';\n\nconst userRegistrationSchema = yup.object({\n username: yup.string()\n .required('Username is required.')\n .min(3, 'Username must be at least 3 characters.')\n .matches(/^[a-zA-Z0-9_]+$/, 'Username can only contain letters, numbers, and underscores.'),\n email: yup.string()\n .email('Invalid email address.')\n .trim()\n .lowercase()\n .required('Email is required.'),\n password: yup.string()\n .required('Password is required.')\n .min(8, 'Password must be at least 8 characters.'),\n confirmPassword: yup.string()\n .required('Confirm password is required.')\n .oneOf([yup.ref('password')], 'Passwords must match.'),\n});\n```\n\nEnter fullscreen modeExit fullscreen mode\n\n### Recent Developments: Enhanced Conditional Logic and Custom Test Methods\n\nYup has consistently refined its conditional validation capabilities, making the `when()` method even more robust for dynamic validation rules. This is crucial for forms where fields become required or change validation rules based on other input values. The `test()` method remains a powerful escape hatch for implementing any custom, asynchronous, or complex validation logic.\n\n```\nimport * as yup from 'yup';\n\nconst paymentSchema = yup.object({\n paymentMethod: yup.string()\n .oneOf(['creditCard', 'paypal', 'bankTransfer'], 'Invalid payment method.')\n .required('Payment method is required.'),\n cardHolderName: yup.string()\n .when('paymentMethod', {\n is: 'creditCard',\n then: (schema) => schema.required('Card holder name is required for credit card payments.'),\n otherwise: (schema) => schema.notRequired(),\n }),\n promoCode: yup.string().optional().test(\n 'check-promo-code',\n 'Invalid or expired promo code.',\n async function (value) {\n if (!value) return true;\n return new Promise((resolve) => {\n setTimeout(() => {\n const validCodes = ['SAVE20', 'FREESHIP'];\n resolve(validCodes.includes(value.toUpperCase()));\n }, 500);\n });\n }\n ),\n});\n```\n\nEnter fullscreen modeExit fullscreen mode\n\n## TypeBox: Compile-Time Validation and JSON Schema Interoperability\n\nTypeBox offers a unique and powerful approach by bridging TypeScript's static type system with JSON Schema's runtime validation. It allows you to define schemas using a TypeScript-like syntax that can then be compiled into standard JSON Schema objects.\n\n### How It Works: Types as Schemas, Schemas as Types\n\nTypeBox leverages TypeScript's powerful type inference capabilities. You define your data structures using TypeBox's `Type` builder API, which closely mirrors TypeScript's native syntax.\n\n* * *\n\n## Sources\n\n- [debugg.ai](https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQHRkCA3Iv6GN2L8Nt4SFF9EGzdJZyuO3ZyIb9SD2hb0kfnWT8KIMWJzo02MKr3SPUeXJK4rNWB1Oy1okM6nBwq2zKXxNTLYmnR4rsmHwpEoFD5s_OmmOfhfE5oQGoRnPno-hg4-thboodswED6oGQf5DDrwaxxoJPE=)\n- [js.org](https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQEtPddo4IcrVNTjQZP5HGh4-FvJobYRUo3ytHWY5cg6iw0EbEs2vvIqBWNtNiqRKL76Mx1024fOEaMGaadj_Hu6-FZNLl4dUXE48PN9_bbX3tP90iN_vUdBuA96138r)\n- [reddit.com](https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQFSKfdPlXs8oAnNN9rTXFrLJ0j-rqWIzcQIjscHppG7abbqsyRmRd5TqYKjfB5X80sBT7RtohZHahyW6eOrgwvHs0h8cXXlYu6TOIPes0lW8NOAVug3VeeKy5f9VfZutkbdpkYD0xum7Y5GGaTOUvjeY2pF3czG1AOOuxAoViOor3RnoXI1KXlPehuPm0t4Hq5zpqz-fSvlm7SEQQ==)\n- [ietf.org](https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQEhhC_qQ2tW5Yaj3VsMOvshLG1S-pW52oJGDeQViPTeIYhUDx0oXh6EHB0TggJKGUqFF8EAG005rW6ixXjNh0LlENCvH3gG53pW10aAFMptP1Zva5a-apcem6zlM5iKwC6WWUhrJR7_3dX6wkD3gTky7afT3gjiC-2RiQrPvQ==)\n- [apiscene.io](https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQHi60He0a_8y8SIjnuckLOlPqam7HzGwWdvAbuleBwuR3mPEzuWqZjlrycceWxZ31dqczqxSfnZe4XX_13uCyLDFOenF7S_bYPSyn_0Mkh_JDy4DbSRz_7rRy59OdSMEelmEKxvVyKh2vhVu1zdLzdhCebt20piYA==)\n\n* * *\n\n## 🛠️ Related Tools\n\nExplore these DataFormatHub tools related to this topic:\n\n- **[JSON Formatter](https://dataformathub.com/utilities/code-formatter)** \\- Format JSON schemas\n- **[JSON to TypeScript](https://dataformathub.com/converters/json-yaml)** \\- Generate types from schema\n\n* * *\n\n## 📚 You Might Also Like\n\n- [JSON vs YAML vs JSON5: The Truth About Data Formats in 2025](https://dataformathub.com/blog/json-vs-yaml-vs-json5-the-truth-about-data-formats-in-2025-ewv)\n- [Rust JS Tooling 2025: Why Biome, Oxc, and Rolldown Change Everything](https://dataformathub.com/blog/rust-js-tooling-2025-why-biome-oxc-and-rolldown-change-everything-31o)\n- [Kong vs. AWS API Gateway: The Truth About API Management in 2025](https://dataformathub.com/blog/kong-vs-aws-api-gateway-the-truth-about-api-management-in-2025-jsh)\n\n* * *\n\n_This article was originally published on [DataFormatHub](https://dataformathub.com/blog/zod-vs-yup-vs-typebox-the-ultimate-schema-validation-guide-for-2025-whd), your go-to resource for data format and developer tools insights._\n\n[![profile](https://media2.dev.to/dynamic/image/width=64,height=64,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F6839%2F3d85988f-d18e-4522-b261-f86613cd9b50.png)\\\\\nSonar](https://dev.to/sonar) Promoted\n\nDropdown menu\n\n- [What's a billboard?](https://dev.to/billboards)\n- [Manage preferences](https://dev.to/settings/customization#sponsors)\n\n* * *\n\n- [Report billboard](https://dev.to/report-abuse?billboard=259979)\n\n[![State of Code Developer Survey report](https://media2.dev.to/dynamic/image/width=775%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fucarecdn.com%2F2f2ce9b0-68e0-48a1-bf3e-46c08831a9be%2F)](https://www.sonarsource.com/sem/the-state-of-code/developer-survey-report/?utm_medium=paid&utm_source=dev&utm_campaign=ss-state-of-code-developer-survey26&utm_content=report-devsurvey-banner-x-2&utm_term=ww-all-x&s_category=Paid&s_source=Paid+Social&s_origin=dev&bb=259979)\n\n## [State of Code Developer Survey report](https://www.sonarsource.com/sem/the-state-of-code/developer-survey-report/?utm_medium=paid&utm_source=dev&utm_campaign=ss-state-of-code-developer-survey26&utm_content=report-devsurvey-banner-x-2&utm_term=ww-all-x&s_category=Paid&s_source=Paid+Social&s_origin=dev&bb=259979)\n\nDid you know 96% of developers don't fully trust that AI-generated code is functionally correct, yet only 48% always check it before committing? Check out Sonar's new report on the real-world impact of AI on development teams.\n\n[Read the results](https://www.sonarsource.com/sem/the-state-of-code/developer-survey-report/?utm_medium=paid&utm_source=dev&utm_campaign=ss-state-of-code-developer-survey26&utm_content=report-devsurvey-banner-x-2&utm_term=ww-all-x&s_category=Paid&s_source=Paid+Social&s_origin=dev&bb=259979)\n\nRead More\n\n\n![pic](https://media2.dev.to/dynamic/image/width=256,height=,fit=scale-down,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j7kvp660rqzt99zui8e.png)\n\n[Create template](https://dev.to/settings/response-templates)\n\nTemplates let you quickly answer FAQs or store snippets for re-use.\n\nSubmitPreview [Dismiss](https://dev.to/404.html)\n\nAre you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's [permalink](https://dev.to/dataformathub/zod-vs-yup-vs-typebox-the-ultimate-schema-validation-guide-for-2025-1l4l#).\n\n\nHide child comments as well\n\nConfirm\n\n\nFor further actions, you may consider blocking this person and/or [reporting abuse](https://dev.to/report-abuse)\n\n[![profile](https://media2.dev.to/dynamic/image/width=64,height=64,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F140%2F9639a040-3c27-4b99-b65a-85e100016d3c.png)\\\\\nMongoDB](https://dev.to/mongodb) Promoted\n\nDropdown menu\n\n- [What's a billboard?](https://dev.to/billboards)\n- [Manage preferences](https://dev.to/settings/customization#sponsors)\n\n* * *\n\n- [Report billboard](https://dev.to/report-abuse?billboard=241238)\n\n[![Build gen AI apps that run anywhere with MongoDB Atlas](https://media2.dev.to/dynamic/image/width=775%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FCjuXF8e.png)](https://www.mongodb.com/cloud/atlas/lp/try3?utm_campaign=display_devto-broad_pl_flighted_atlas_tryatlaslp_prosp_gic-null_ww-all_dev_dv-all_eng_leadgen&utm_source=devto&utm_medium=display&utm_content=aipowered-v1&bb=241238)\n\n## [Build gen AI apps that run anywhere with MongoDB Atlas](https://www.mongodb.com/cloud/atlas/lp/try3?utm_campaign=display_devto-broad_pl_flighted_atlas_tryatlaslp_prosp_gic-null_ww-all_dev_dv-all_eng_leadgen&utm_source=devto&utm_medium=display&utm_content=aipowered-v1&bb=241238)\n\nMongoDB Atlas bundles vector search and a flexible document model so developers can build, scale, and run gen AI apps without juggling multiple databases. From LLM to semantic search, Atlas streamlines AI architecture. Start free today.\n\n[Start Free](https://www.mongodb.com/cloud/atlas/lp/try3?utm_campaign=display_devto-broad_pl_flighted_atlas_tryatlaslp_prosp_gic-null_ww-all_dev_dv-all_eng_leadgen&utm_source=devto&utm_medium=display&utm_content=aipowered-v1&bb=241238)\n\n👋 Kindness is contagious\n\nDropdown menu\n\n- [What's a billboard?](https://dev.to/billboards)\n- [Manage preferences](https://dev.to/settings/customization#sponsors)\n\n* * *\n\n- [Report billboard](https://dev.to/report-abuse?billboard=236879)\n\nx\n\nDive into this thoughtful piece, beloved in the supportive DEV Community. **Coders of every background** are invited to share and elevate our collective know-how.\n\nA sincere \"thank you\" can brighten someone's day—leave your appreciation below!\n\nOn DEV, **sharing knowledge smooths our journey** and tightens our community bonds. Enjoyed this? A quick thank you to the author is hugely appreciated.\n\n### [Okay](https://dev.to/enter?state=new-user&bb=236879)\n\n![DEV Community](https://media2.dev.to/dynamic/image/width=190,height=,fit=scale-down,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j7kvp660rqzt99zui8e.png)\n\nWe're a place where coders share, stay up-to-date and grow their careers.\n\n\n[Log in](https://dev.to/enter?signup_subforem=1) [Create account](https://dev.to/enter?signup_subforem=1&state=new-user)\n\n![](https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg)![](https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg)![](https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg)![](https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg)![](https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg)","metadata":{"description":"Stop guessing your data's shape. Master Zod, Yup, and TypeBox to build bulletproof, type-safe TypeScript applications in 2025. Learn the latest features now. Tagged with validation, typescript, data, news.","og:title":"Zod vs Yup vs TypeBox: The Ultimate Schema Validation Guide for 2025","og:description":"Stop guessing your data's shape. Master Zod, Yup, and TypeBox to build bulletproof, type-safe TypeScript applications in 2025. Learn the latest features now.","ogImage":"https://media2.dev.to/dynamic/image/width=1000,height=500,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdataformathub.com%2Fassets%2Fimages%2Fblog%2F2025-12-31-zod-vs-yup-vs-typebox-the-ultimate-schema-validation-guide-for-2025-whd.webp","csrf-token":"OClDl7B3jYh94EX6BFmvbTAtnkGvQqqauFoukUTVpQsgaEfC2RvjkYY_yTvHqnOkTtuIVsK9T8YpDlaVRqexSg","twitter:image:src":"https://media2.dev.to/dynamic/image/width=1000,height=500,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdataformathub.com%2Fassets%2Fimages%2Fblog%2F2025-12-31-zod-vs-yup-vs-typebox-the-ultimate-schema-validation-guide-for-2025-whd.webp","search-script":"https://assets.dev.to/assets/Search-b977aea0f2d7a5818b4ebd97f7d4aba8548099f84f5db5761f8fa67be76abc54.js","keywords":"validation, typescript, data, news, software, coding, development, engineering, inclusive, community","csrf-param":"authenticity_token","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","viewport":"width=device-width, initial-scale=1.0, viewport-fit=cover","apple-mobile-web-app-title":"dev.to","environment":"production","twitter:site":"@thepracticaldev","ogUrl":"https://dev.to/dataformathub/zod-vs-yup-vs-typebox-the-ultimate-schema-validation-guide-for-2025-1l4l","og:type":"article","og:url":"https://dev.to/dataformathub/zod-vs-yup-vs-typebox-the-ultimate-schema-validation-guide-for-2025-1l4l","twitter:creator":"@","forem:domain":"dev.to","user-signed-in":"false","og:site_name":"DEV Community","twitter:title":"Zod vs Yup vs TypeBox: The Ultimate Schema Validation Guide for 2025","twitter:card":"summary_large_image","twitter:description":"Stop guessing your data's shape. Master Zod, Yup, and TypeBox to build bulletproof, type-safe TypeScript applications in 2025. Learn the latest features now.","ogTitle":"Zod vs Yup vs TypeBox: The Ultimate Schema Validation Guide for 2025","last-updated":"2026-03-28 11:30:53 UTC","forem:logo":"https://media2.dev.to/dynamic/image/width=512,height=,fit=scale-down,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j7kvp660rqzt99zui8e.png","og:image":"https://media2.dev.to/dynamic/image/width=1000,height=500,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdataformathub.com%2Fassets%2Fimages%2Fblog%2F2025-12-31-zod-vs-yup-vs-typebox-the-ultimate-schema-validation-guide-for-2025-whd.webp","title":"Zod vs Yup vs TypeBox: The Ultimate Schema Validation Guide for 2025 - DEV Community","head-cached-at":"1774697453","forem:name":"DEV Community","ogSiteName":"DEV Community","application-name":"dev.to","language":"en","ogDescription":"Stop guessing your data's shape. Master Zod, Yup, and TypeBox to build bulletproof, type-safe TypeScript applications in 2025. Learn the latest features now.","twitter:widgets:new-embed-design":"on","theme-color":["#ffffff","#000000"],"favicon":"https://media2.dev.to/dynamic/image/width=32,height=,fit=scale-down,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8j7kvp660rqzt99zui8e.png","scrapeId":"019d3953-b08b-75e8-8dc0-eea0b1644ce4","sourceURL":"https://dev.to/dataformathub/zod-vs-yup-vs-typebox-the-ultimate-schema-validation-guide-for-2025-1l4l","url":"https://dev.to/dataformathub/zod-vs-yup-vs-typebox-the-ultimate-schema-validation-guide-for-2025-1l4l","statusCode":200,"contentType":"text/html; charset=utf-8","timezone":"America/New_York","proxyUsed":"basic","cacheState":"miss","indexId":"e1944d08-2288-4646-8f0c-bf09c237b87f","creditsUsed":1}},{"url":"https://www.merge.dev/blog/mcp-tool-schema","title":"MCP tool schema: what it is, how it works, and examples","description":"It's a JSON object that outlines the required and optional arguments for a tool. This helps AI agents identify the appropriate ways to invoke tools. Each tool ...","position":4,"markdown":"Merges Cookie Policy\n\nWe use cookies to improve your experience on our site. By clicking “Accept”, you are agreeing to the collection and use of data as described in our [Privacy Policy](https://www.merge.dev/legal/privacy-policy).\n\n[Accept all cookies](https://www.merge.dev/blog/mcp-tool-schema#) [Cookie settings](https://www.merge.dev/cookie-settings)\n\n[×](https://www.merge.dev/blog/mcp-tool-schema#)\n\nWe use cookies to improve your experience on our site. By using our site, you are agreeing to the collection and use of data as described in our [Privacy Policy](https://www.merge.dev/legal/privacy-policy).\n\n[Cookie Settings](https://www.merge.dev/archive/cookie-settings) [×](https://www.merge.dev/blog/mcp-tool-schema#)\n\nTable of contents\n\n###### Add secure integrations to your products and AI agents with ease via Merge.\n\n[Get a demo](https://www.merge.dev/get-in-touch-merge-unified)\n\n##### Just for you\n\n[![](https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67d8579e8b825ec843ba604a_Blog%20Header%20Brand%20Refresh%20(4).png)**9 best practices for building secure and reliable AI agents**](https://www.merge.dev/blog/best-practices-for-building-ai-agents)\n\n[![](https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67d8578f0b3a81cb7b7c635a_Blog%20Header%20Brand%20Refresh%20(2).png)**Model Context Protocol (MCP) tools: what you need to know**](https://www.merge.dev/blog/mcp-tools)\n\n# MCP tool schema: what it is, how it works, and examples\n\n![](https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67eaee364b71b526302499ce_Blog%20Header%20Brand%20Refresh%20(8).png)\n\n![](https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67cb26b36cc62374679f071f_Jon%20Gitlin%20-%20Merge.png)![](https://cdn.prod.website-files.com/62796ab9647626cbab663f42/64dd538684e09763589291b7_64c13599abc4a993825ecd2d_Jon%2520Gitlin%2520headshot.webp)\n\nJon Gitlin\n\nSenior Content Marketing Manager\n\nat Merge\n\nBefore your AI agents can invoke tools successfully, they need to understand the parameters, or arguments, that need to pass into the tools.\n\nOtherwise, the tool will return an error.\n\nFor example, if youre trying to call Asanas `get_user` tool and you dont include a required argument like a user name, you can receive the following response:\n\n```python\nError during execution of 'asana_connector.tools.user_tools.get_current_user': Failed to get current user\n1 validation error for User name\n Field required [type=missing, input_value={'gid': '1211364474763721', 'resource_type': 'workspace'}, input_type=dict]\n```\n\nTo help you avoid this type of error, well break down everything you need to know about MCP tool schema, from how you can construct calls with arguments to real-world examples.\n\n## **What is MCP tool schema?**\n\nIts a JSON object that outlines the required and optional arguments for a tool. This helps AI agents identify the appropriate ways to invoke tools.\n\nEach tool schema includes the following fields:\n\n- The tool's name. For example, `get_user`\n- A description in plain text that explains what the tool does\n- InputSchema, which defines the structure and type of data the tool accepts, such as an object or a string\n- Whether a given data type is required or not\n\nPutting this all together, heres how it can be structured:\n\n```python\n{\n\"name\": \"tool_name_here\",\n\"description\": \"Describe what this tool does and list key parameters.\",\n\"input_schema\": {\n\"type\": \"object\",\n\"properties\": {\n\"param1\": { \"type\": \"string\", \"description\": \"Required parameter.\" },\n\"param2\": { \"type\": \"integer\", \"description\": \"Optional parameter.\" }\n},\n\"required\": [\"param1\"]\n}\n}\n```\n\n_Related:_ [_What is an MCP connector?_](https://www.merge.dev/blog/mcp-connectors)\n\n## **How to use MCP tool schema**\n\nOnce you understand a tools MCP schema, your agent can structure your tool call via JSON.\n\nFor example, if you know a user ID is required and you want to retrieve a users full name and email address, your agent can use the following JSON as part of its request:\n\n```python\n{\n \"tool\": \"get_user\",\n \"arguments\": {\n \"user_id\": \"1203984756123456\",\n \"fields\": [\"name\", \"email\"]\n }\n}\n```\n\n_Note:_ [_MCP tool descriptions_](https://www.merge.dev/blog/mcp-tool-description) _and names are the other core elements of an_ [_MCP tool_](https://www.merge.dev/blog/mcp-tools) _. They can help your AI agents determine the best tool to invoke, so theyre used before the agent leverages a tools schema._\n\n## **Examples of MCP tool schemas**\n\nHere are just a few MCP tool schemas from [Merge Agent Handlers MCP servers](https://docs.ah.merge.dev/Overview/connectors-marketplace).\n\n### **GitHubs tool schema for fetching issues**\n\nThe project management platform for developers can use the tool schema below for its `get_issue` tool.\n\n```python\n{\n \"name\": \"get_issue\",\n \"description\": \"Get a single issue by number from a specific repository. Returns detailed issue information including comments, labels, and assignees\",\n \"inputSchema\": {\n \"type\": \"object\",\n \"required\": [\\\n \"input\"\\\n ],\n \"properties\": {\n \"input\": {\n \"type\": \"object\",\n \"title\": \"GetIssueInput\",\n \"required\": [\\\n \"owner\",\\\n \"repo\",\\\n \"issue_number\"\\\n ],\n \"properties\": {\n \"repo\": {\n \"type\": \"string\",\n \"description\": \"Repository name\"\n },\n \"owner\": {\n \"type\": \"string\",\n \"description\": \"Repository owner\"\n },\n \"issue_number\": {\n \"type\": \"integer\",\n \"description\": \"Issue number\"\n }\n },\n \"additionalProperties\": false\n }\n },\n \"additionalProperties\": false\n }\n}\n```\n\nThis schema confirms that the arguments need to use an input thats an object.\n\nYoull need to nest the owner, repo, and issue number within the input. In addition, the owner and repo be provided via string format, while the issue number needs to be an integer.\n\n_Explore Merge Agent Handler's_ [_GitHub MCP server_](https://www.merge.dev/connectors/github) _and available tools._\n\n### **Slacks tool schema for creating a channel**\n\nThe business communications platform can use the tool schema below for its `create_channel` tool to help agents create a specific channel.\n\n```python\n{\n \"name\": \"create_channel\",\n \"description\": \"Create a new channel\",\n \"inputSchema\": {\n \"type\": \"object\",\n \"required\": [\\\n \"input\"\\\n ],\n \"properties\": {\n \"input\": {\n \"type\": \"object\",\n \"title\": \"ChannelInput\",\n \"required\": [\\\n \"name\",\\\n \"is_private\",\\\n \"team_id\"\\\n ],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"Channel name\"\n },\n \"team_id\": {\n \"anyOf\": [\\\n {\\\n \"type\": \"string\"\\\n },\\\n {\\\n \"type\": \"null\"\\\n }\\\n ],\n \"description\": \"Team ID\"\n },\n \"is_private\": {\n \"anyOf\": [\\\n {\\\n \"type\": \"boolean\"\\\n },\\\n {\\\n \"type\": \"null\"\\\n }\\\n ],\n \"description\": \"Whether to create a private channel\"\n }\n },\n \"additionalProperties\": false\n }\n },\n \"additionalProperties\": false\n }\n}\n```\n\nLike the previous example, this tools arguments need to be wrapped inside an input object. Within that object, youll need to confirm the team the channel should belong to (as a string), the channel name you want to use (as a string), and whether the channel should be private or public (as a boolean).\n\n### **Greenhouses tool schema for moving applications to another stage**\n\nGreenhouse can help agents move candidates to different stages in the ATS platform by providing the following schema for its `move_applications` tool.\n\n```python\n{\n \"name\": \"move_application\",\n \"description\": \"Move an application from one stage to another\",\n \"inputSchema\": {\n \"type\": \"object\",\n \"required\": [\\\n \"application_id\",\\\n \"input\"\\\n ],\n \"properties\": {\n \"input\": {\n \"type\": \"string\",\n \"default\": \"Field(..., description='Stage movement parameters (MUST include on_behalf_of)')\"\n },\n \"application_id\": {\n \"type\": \"integer\",\n \"default\": \"Field(..., description='Unique identifier for the application')\"\n }\n },\n \"additionalProperties\": false\n }\n}\n```\n\nThe only required arguments are the application ID and an input argument that includes the parameter, “`on_behalf_of`” (to clarify whos asking the agent to move the application to a different stage). In addition, the former argument should be an integer while the latter should be a string.\n\n#### Access 1000s of enterprise-grade tools via Merge Agent Handler\n\nMerge Agent Handler's tools use rich, actionable schemas, clear names, and optimized descriptions. Sign up for free to test any tool implementation.\n\n[Sign up for free](https://ah.merge.dev/signup)\n\n![](https://cdn.prod.website-files.com/624b192df0b0151225c10026/67b45ba027fc65a2262dc95d_cta-bg.svg)\n\n![](https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67cb26b36cc62374679f071f_Jon%20Gitlin%20-%20Merge.png)\n\nJon Gitlin\n\nSenior Content Marketing Manager\n\n@Merge\n\nJon Gitlin is the Managing Editor of Merge's blog. He has several years of experience in the integration and automation space; before Merge, he worked at Workato, an integration platform as a service (iPaaS) solution, where he also managed the company's blog. In his free time he loves to watch soccer matches, go on long runs in parks, and explore local restaurants.\n\n## Read more\n\n[MCP Gateway: overview, benefits, and solutions](https://www.merge.dev/blog/model-context-protocol-gateway)\n\n![](https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67d857c228f210c3289347ec_Blog%20Header%20Brand%20Refresh%20(5).png)\n\n### MCP Gateway: overview, benefits, and solutions\n\nAI\n\n[How we build the most reliable MCP connectors](https://www.merge.dev/blog/how-we-build-mcp-connectors)\n\n![](https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67d9ca5e423a87d4859f5726_AI%20product%20strategy.png)\n\n### How we build the most reliable MCP connectors\n\nCompany\n\n[Introducing AI Data Transformations for Merge Unified: product-ready data, without custom code](https://www.merge.dev/blog/ai-data-transformations)\n\n![](https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67d8579e8b825ec843ba604a_Blog%20Header%20Brand%20Refresh%20(4).png)\n\n### Introducing AI Data Transformations for Merge Unified: product-ready data, without custom code\n\nCompany\n\n## Subscribe to the Merge Blog\n\nGet stories from Merge straight to your inbox\n\n[Subscribe](https://www.merge.dev/blog/mcp-tool-schema#)\n\n![](https://cdn.prod.website-files.com/624b192df0b0151225c10026/67a0696c88fcb6b1a1d8ad6f_CTA%20Background%20Logo.svg)\n\nRelated\n\n#### 3 ways to drive business results with your new Merge integrations\n\n![](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)\n\nRelated\n\n#### 3 ways to drive business results with your new Merge integrations\n\n### Get our best content straight to your inbox\n\nOur blog's newsletter provides the best practices you need to build high-performing integrations for your products and agents.\n\nYour work email\n\nThank you! Your submission has been received!\n\nOops! Something went wrong while submitting the form.\n\nBut Merge isnt just a Unified API product. Merge is an integration platform to also manage customer integrations. _gradient text_\n\nBut Merge isnt just a Unified API product. Merge is an integration platform to also manage customer integrations. _gradient text_\n\nBut Merge isnt just a Unified API product. Merge is an integration platform to also manage customer integrations. _gradient text_\n\nBut Merge isnt just a Unified API product. Merge is an integration platform to also manage customer integrations. _gradient text_","metadata":{"language":"en","ogImage":"https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67eaee364b71b526302499ce_Blog%20Header%20Brand%20Refresh%20(8).png","og:title":"MCP tool schema: what it is, how it works, and examples","description":"Well share everything you need to know about MCP tool schema, from how you can construct calls with arguments to real-world examples.","twitter:title":"MCP tool schema: what it is, how it works, and examples","twitter:description":"Well share everything you need to know about MCP tool schema, from how you can construct calls with arguments to real-world examples.","google-site-verification":"7wascdPQCmcqoTRIG913gd6Tbh23pohdYheOpNTQpAM","twitter:image":"https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67eaee364b71b526302499ce_Blog%20Header%20Brand%20Refresh%20(8).png","og:description":"Well share everything you need to know about MCP tool schema, from how you can construct calls with arguments to real-world examples.","title":"MCP tool schema: what it is, how it works, and examples","og:type":"website","viewport":"width=device-width, initial-scale=1","og:image":"https://cdn.prod.website-files.com/62796ab9647626cbab663f42/67eaee364b71b526302499ce_Blog%20Header%20Brand%20Refresh%20(8).png","twitter:card":"summary_large_image","ogTitle":"MCP tool schema: what it is, how it works, and examples","ogDescription":"Well share everything you need to know about MCP tool schema, from how you can construct calls with arguments to real-world examples.","favicon":"https://cdn.prod.website-files.com/624b192df0b0151225c10026/67cb6c34d13b8820b244337b_fav.png","scrapeId":"019d3953-b08b-75e8-8dc0-f0cb5aac89ba","sourceURL":"https://www.merge.dev/blog/mcp-tool-schema","url":"https://www.merge.dev/blog/mcp-tool-schema","statusCode":200,"contentType":"text/html; charset=utf-8","proxyUsed":"basic","cacheState":"hit","cachedAt":"2026-03-27T19:16:42.469Z","creditsUsed":1}},{"url":"https://mintlify.com/punkpeye/fastmcp/guides/schema-validation","title":"Schema validation - FastMCP","description":"... format. . Next steps. Tools. Learn more about tool definitions · Error Handling. Handle errors in your tools · Logging. Previous · Error handling. Next. Ctrl+I.","position":5,"markdown":"[Skip to main content](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation#content-area)\n\nGenerated[Mar 3, 2026](https://github.com/punkpeye/fastmcp/commit/12524581c777ccfd9d72d00b7230838f0af3800d)by\\| [Use as starter template](https://dashboard.mintlify.com/atlas/clone?atlas_deployment_id=69a681aa8cbcc042c26a2cac&utm_medium=atlas_referral)\n\n[FastMCP home page\\\\\nFastMCP](https://www.mintlify.com/punkpeye/fastmcp)\n\nSearch...\n\nCtrl KAsk AI\n\nSearch...\n\nNavigation\n\nGuides\n\nSchema validation\n\n[Documentation](https://www.mintlify.com/punkpeye/fastmcp) [API Reference](https://www.mintlify.com/punkpeye/fastmcp/api/fastmcp) [CLI](https://www.mintlify.com/punkpeye/fastmcp/cli/overview)\n\n##### Get Started\n\n- [FastMCP Documentation](https://www.mintlify.com/punkpeye/fastmcp)\n- [Installation](https://www.mintlify.com/punkpeye/fastmcp/installation)\n- [Quickstart](https://www.mintlify.com/punkpeye/fastmcp/quickstart)\n\n##### Core Concepts\n\n- [Tools](https://www.mintlify.com/punkpeye/fastmcp/core/tools)\n- [Resources](https://www.mintlify.com/punkpeye/fastmcp/core/resources)\n- [Prompts](https://www.mintlify.com/punkpeye/fastmcp/core/prompts)\n- [Sessions](https://www.mintlify.com/punkpeye/fastmcp/core/sessions)\n- [Transports](https://www.mintlify.com/punkpeye/fastmcp/core/transports)\n\n##### Features\n\n- [Authentication](https://www.mintlify.com/punkpeye/fastmcp/features/authentication)\n- [OAuth Proxy](https://www.mintlify.com/punkpeye/fastmcp/features/oauth-proxy)\n- [Custom Routes](https://www.mintlify.com/punkpeye/fastmcp/features/custom-routes)\n- [Edge Runtime](https://www.mintlify.com/punkpeye/fastmcp/features/edge-runtime)\n- [Streaming & Progress](https://www.mintlify.com/punkpeye/fastmcp/features/streaming)\n- [Logging](https://www.mintlify.com/punkpeye/fastmcp/features/logging)\n\n##### Guides\n\n- [Schema validation](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation)\n- [Error handling](https://www.mintlify.com/punkpeye/fastmcp/guides/error-handling)\n- [Progress notifications](https://www.mintlify.com/punkpeye/fastmcp/guides/progress-notifications)\n- [Embedded resources](https://www.mintlify.com/punkpeye/fastmcp/guides/embedded-resources)\n- [Stateless mode](https://www.mintlify.com/punkpeye/fastmcp/guides/stateless-mode)\n- [HTTPS setup](https://www.mintlify.com/punkpeye/fastmcp/guides/https-setup)\n\n##### Deployment\n\n- [Cloudflare Workers Deployment](https://www.mintlify.com/punkpeye/fastmcp/deployment/cloudflare-workers)\n- [Serverless Deployments](https://www.mintlify.com/punkpeye/fastmcp/deployment/serverless)\n- [Production Checklist](https://www.mintlify.com/punkpeye/fastmcp/deployment/production)\n\nOn this page\n\n- [Supported libraries](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation#supported-libraries)\n- [Using Zod](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation#using-zod)\n- [Using ArkType](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation#using-arktype)\n- [Using Valibot](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation#using-valibot)\n- [Tools without parameters](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation#tools-without-parameters)\n- [Type inference](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation#type-inference)\n- [Complex schemas](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation#complex-schemas)\n- [Validation errors](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation#validation-errors)\n- [Next steps](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation#next-steps)\n\nFastMCP uses the [Standard Schema](https://standardschema.dev/) specification for defining tool parameters. This allows you to use your preferred schema validation library (Zod, ArkType, or Valibot) as long as it implements the spec.\n\n## [](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation\\#supported-libraries) Supported libraries\n\nFastMCP supports any validation library that implements the Standard Schema specification:\n\n[**Zod** \\\\\n\\\\\nMost popular TypeScript-first schema validation](https://zod.dev/)\n\n[**ArkType** \\\\\n\\\\\nTypeScripts 1:1 validator](https://arktype.io/)\n\n[**Valibot** \\\\\n\\\\\nModular and type-safe schema library](https://valibot.dev/)\n\n## [](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation\\#using-zod) Using Zod\n\nZod is the most popular choice and comes with excellent TypeScript support:\n\n```\nimport { FastMCP } from \"fastmcp\";\nimport { z } from \"zod\";\n\nconst server = new FastMCP({\n name: \"My Server\",\n version: \"1.0.0\",\n});\n\nserver.addTool({\n name: \"fetch-content\",\n description: \"Fetch the content of a URL\",\n parameters: z.object({\n url: z.string().url(),\n timeout: z.number().optional().default(5000),\n headers: z.record(z.string()).optional(),\n }),\n execute: async (args) => {\n // args is fully typed: { url: string; timeout: number; headers?: Record<string, string> }\n return `Fetching ${args.url} with timeout ${args.timeout}ms`;\n },\n});\n```\n\n## [](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation\\#using-arktype) Using ArkType\n\nArkType provides 1:1 TypeScript syntax for runtime validation:\n\n```\nimport { FastMCP } from \"fastmcp\";\nimport { type } from \"arktype\";\n\nconst server = new FastMCP({\n name: \"My Server\",\n version: \"1.0.0\",\n});\n\nserver.addTool({\n name: \"fetch-content\",\n description: \"Fetch the content of a URL\",\n parameters: type({\n url: \"string\",\n \"timeout?\": \"number\",\n \"headers?\": \"Record<string, string>\",\n }),\n execute: async (args) => {\n return `Fetching ${args.url}`;\n },\n});\n```\n\n## [](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation\\#using-valibot) Using Valibot\n\nValibot is a modular, lightweight alternative with a functional API:\n\nValibot requires the peer dependency `@valibot/to-json-schema`.\n\n```\nnpm install valibot @valibot/to-json-schema\n```\n\n```\nimport { FastMCP } from \"fastmcp\";\nimport * as v from \"valibot\";\n\nconst server = new FastMCP({\n name: \"My Server\",\n version: \"1.0.0\",\n});\n\nserver.addTool({\n name: \"fetch-content\",\n description: \"Fetch the content of a URL\",\n parameters: v.object({\n url: v.string(),\n timeout: v.optional(v.number()),\n headers: v.optional(v.record(v.string(), v.string())),\n }),\n execute: async (args) => {\n return `Fetching ${args.url}`;\n },\n});\n```\n\n## [](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation\\#tools-without-parameters) Tools without parameters\n\nWhen creating tools that dont require parameters, you have two options:\n\n- Omit parameters\n\n- Empty object\n\n\n```\nserver.addTool({\n name: \"sayHello\",\n description: \"Say hello\",\n // No parameters property\n execute: async () => {\n return \"Hello, world!\";\n },\n});\n```\n\n```\nimport { z } from \"zod\";\n\nserver.addTool({\n name: \"sayHello\",\n description: \"Say hello\",\n parameters: z.object({}), // Empty object\n execute: async () => {\n return \"Hello, world!\";\n },\n});\n```\n\nBoth approaches are fully compatible with all MCP clients, including Cursor. FastMCP automatically generates the proper schema in both cases.\n\n## [](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation\\#type-inference) Type inference\n\nAll schema libraries provide automatic TypeScript type inference for the `execute` function:\n\n```\nimport { z } from \"zod\";\n\nconst UserSchema = z.object({\n name: z.string(),\n age: z.number(),\n email: z.string().email(),\n});\n\nserver.addTool({\n name: \"createUser\",\n description: \"Create a new user\",\n parameters: UserSchema,\n execute: async (args) => {\n // args is typed as: { name: string; age: number; email: string }\n return `Created user: ${args.name} (${args.email}), age ${args.age}`;\n },\n});\n```\n\n## [](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation\\#complex-schemas) Complex schemas\n\nYou can use all features of your chosen schema library:\n\n```\nimport { z } from \"zod\";\n\nserver.addTool({\n name: \"processData\",\n description: \"Process complex data\",\n parameters: z.object({\n // Enums\n status: z.enum([\"pending\", \"active\", \"completed\"]),\n\n // Arrays\n tags: z.array(z.string()).min(1).max(10),\n\n // Nested objects\n metadata: z.object({\n createdBy: z.string(),\n timestamp: z.number(),\n }),\n\n // Union types\n value: z.union([z.string(), z.number()]),\n\n // Optional with default\n priority: z.number().min(1).max(5).default(3),\n }),\n execute: async (args) => {\n return `Processing with status: ${args.status}`;\n },\n});\n```\n\n## [](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation\\#validation-errors) Validation errors\n\nWhen a client passes invalid parameters, FastMCP automatically handles validation errors and returns them to the client:\n\n```\nimport { z } from \"zod\";\n\nserver.addTool({\n name: \"validateEmail\",\n description: \"Validate an email address\",\n parameters: z.object({\n email: z.string().email(\"Invalid email format\"),\n }),\n execute: async (args) => {\n return `Valid email: ${args.email}`;\n },\n});\n\n// If client passes { email: \"not-an-email\" }, they receive:\n// Error: Invalid email format\n```\n\n## [](https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation\\#next-steps) Next steps\n\n[**Tools** \\\\\n\\\\\nLearn more about tool definitions](https://www.mintlify.com/punkpeye/fastmcp/core/tools)\n\n[**Error Handling** \\\\\n\\\\\nHandle errors in your tools](https://www.mintlify.com/punkpeye/fastmcp/guides/error-handling)\n\n[Logging\\\\\n\\\\\nPrevious](https://www.mintlify.com/punkpeye/fastmcp/features/logging) [Error handling\\\\\n\\\\\nNext](https://www.mintlify.com/punkpeye/fastmcp/guides/error-handling)\n\nCtrl+I\n\nAssistant\n\nResponses are generated using AI and may contain mistakes.","metadata":{"next-size-adjust":"","ogUrl":"https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation","canonical":"https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation","msapplication-config":"https://mintlify.s3.us-west-1.amazonaws.com/punkpeye-fastmcp/_generated/favicon/browserconfig.xml?v=3","ogTitle":"Schema validation - FastMCP","msapplication-TileColor":"#5B7FFF","viewport":"width=device-width, initial-scale=1, viewport-fit=cover","application-name":"FastMCP","og:description":"Use Zod, Valibot, or ArkType for type-safe tool parameters with Standard Schema support","twitter:description":"Use Zod, Valibot, or ArkType for type-safe tool parameters with Standard Schema support","og:title":"Schema validation - FastMCP","twitter:image:height":"630","twitter:title":"Schema validation - FastMCP","charset":"utf-8","og:type":"website","title":"Schema validation - FastMCP","description":"Use Zod, Valibot, or ArkType for type-safe tool parameters with Standard Schema support","og:image":"https://punkpeye-fastmcp.mintlify.app/mintlify-assets/_next/image?url=%2F_mintlify%2Fapi%2Fog%3Fdivision%3DGuides%26title%3DSchema%2Bvalidation%26description%3DUse%2BZod%252C%2BValibot%252C%2Bor%2BArkType%2Bfor%2Btype-safe%2Btool%2Bparameters%2Bwith%2BStandard%2BSchema%2Bsupport%26primaryColor%3D%25235B7FFF%26lightColor%3D%25237B9AFF%26darkColor%3D%25234A66CC%26backgroundLight%3D%2523ffffff%26backgroundDark%3D%25230b0c10&w=1200&q=100","og:image:height":"630","twitter:card":"summary_large_image","language":"en","og:image:width":"1200","generator":"Mintlify","ogDescription":"Use Zod, Valibot, or ArkType for type-safe tool parameters with Standard Schema support","apple-mobile-web-app-title":"FastMCP","twitter:image":"https://punkpeye-fastmcp.mintlify.app/mintlify-assets/_next/image?url=%2F_mintlify%2Fapi%2Fog%3Fdivision%3DGuides%26title%3DSchema%2Bvalidation%26description%3DUse%2BZod%252C%2BValibot%252C%2Bor%2BArkType%2Bfor%2Btype-safe%2Btool%2Bparameters%2Bwith%2BStandard%2BSchema%2Bsupport%26primaryColor%3D%25235B7FFF%26lightColor%3D%25237B9AFF%26darkColor%3D%25234A66CC%26backgroundLight%3D%2523ffffff%26backgroundDark%3D%25230b0c10&w=1200&q=100","twitter:image:width":"1200","ogImage":"https://punkpeye-fastmcp.mintlify.app/mintlify-assets/_next/image?url=%2F_mintlify%2Fapi%2Fog%3Fdivision%3DGuides%26title%3DSchema%2Bvalidation%26description%3DUse%2BZod%252C%2BValibot%252C%2Bor%2BArkType%2Bfor%2Btype-safe%2Btool%2Bparameters%2Bwith%2BStandard%2BSchema%2Bsupport%26primaryColor%3D%25235B7FFF%26lightColor%3D%25237B9AFF%26darkColor%3D%25234A66CC%26backgroundLight%3D%2523ffffff%26backgroundDark%3D%25230b0c10&w=1200&q=100","og:url":"https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation","og:site_name":"FastMCP","favicon":"https://mintlify.s3.us-west-1.amazonaws.com/punkpeye-fastmcp/_generated/favicon/favicon-32x32.png?v=3","scrapeId":"019d3953-b08b-75e8-8dc0-f7f82436acbb","sourceURL":"https://mintlify.com/punkpeye/fastmcp/guides/schema-validation","url":"https://www.mintlify.com/punkpeye/fastmcp/guides/schema-validation","statusCode":200,"contentType":"text/html; charset=utf-8","timezone":"America/New_York","proxyUsed":"basic","cacheState":"miss","indexId":"abd15fbd-6ebe-4798-b7af-aac1ef03ea9c","creditsUsed":1}}]}}