Skip to content

Json To Zod Schema MCP tool

MCP findutils:json_to_zod_schema

Generate a Zod validation schema (TypeScript source) from a JSON sample. Detects email, URL, UUID, and ISO date strings, marks integers with .int(), and emits the z.infer type.

Arguments

application/json
  • json

    string required

    JSON sample to convert.

  • add_comments

    boolean optional

    Append a short comment after detected formats (e.g. "// email format"). Default: true. Default true.

  • use_optional

    boolean optional

    Append .optional() to every object property. Default: false. Default false.

  • export_type

    string optional

    How the schema is exported: "const" (no export), "named" (export const), or "default" (export default). Default: "const". One of const · named · default. Default "const".

Example arguments

Verified
{
  "json": {
    "id": 1,
    "email": "a@b.co"
  }
}