Skip to main content
Glama
vola-trebla

zod-contract-mock-forge-mcp

by vola-trebla

zod-contract-mock-forge-mcp

npm version npm downloads CI License: MIT

An MCP server that turns Zod schemas into mocks, violations, and contract tests — so your AI agent can reason about API contracts without manually crafting payloads.

The Problem

Zod schemas are runtime code. An AI agent cannot execute them, introspect their constraints, or generate valid/invalid payloads without this layer. The agent also cannot detect when the schema and the OpenAPI docs silently diverged, or whether a schema change breaks existing test fixtures.

Related MCP server: SpecBridge MCP

Tools

Mock generation

Tool

Arguments

What it returns

generate_valid_mock

schema_code, count?

Valid mock data matching the schema

generate_mock_variants

schema_code, count?, seed?

N structurally valid but value-diverse mocks — for property-based testing

Violation generation

Tool

Arguments

What it returns

generate_boundary_violations

schema_code

Invalid payloads for each constraint: missing fields, type mismatches, min/max, email/uuid/url

generate_exhaustive_union_violations

schema_code

Per-variant violations for every branch of a z.union() or z.discriminatedUnion()

Schema analysis

Tool

Arguments

What it returns

introspect_schema

schema_code

JSON Schema representation — for LLM understanding of the contract

read_schema_from_file

file_path, export_name?

Extracts the Zod schema expression from a TypeScript/JS file

detect_schema_drift

zod_file_path, schema_export_name, openapi_file_path, openapi_schema_name?

Diffs Zod vs OpenAPI — reports missing_in_openapi, missing_in_zod, type_conflict, required_mismatch

evaluate_schema_evolution

schema_file_path, schema_export_name, old_schema_content?

Generates mocks from old schema, validates against new — detects breaking changes before tests run

Contract testing

Tool

Arguments

What it returns

scaffold_api_contract_test

framework, base_url, endpoint, method, schema_code, test_name?

Contract test boilerplate for Playwright, Jest, Vitest, or MSW

suggest_contract_fix

schema_code, payload

Validates a JSON payload and explains each violation with a fix suggestion

Setup

1. Install

npm install -g zod-contract-mock-forge-mcp

2. Add to your editor

Cursor / VS Code (.cursor/mcp.json or .vscode/mcp.json)

{
  "mcpServers": {
    "zod-forge": {
      "command": "zod-contract-mock-forge-mcp"
    }
  }
}

Claude Code

claude mcp add zod-forge zod-contract-mock-forge-mcp

Example usage

My schema file is src/schemas/user.ts, exported as UserSchema.
My OpenAPI spec is docs/openapi.yaml.

1. introspect_schema — what are the constraints on this schema?
2. generate_mock_variants — give me 10 diverse valid payloads (seed: 42) for CI reproducibility
3. generate_exhaustive_union_violations — test every branch of the role discriminated union
4. detect_schema_drift — has the Zod schema diverged from the OpenAPI docs?
5. evaluate_schema_evolution — does my schema change break any existing mock data?

Example output

generate_mock_variants — 3 diverse valid mocks, seeded for CI:

{
  "schema_id": "schema_a1b2c3d4",
  "count": 3,
  "all_valid": true,
  "variants": [
    { "name": "Colleen Rowe", "age": 37 },
    { "name": "Pat Reynolds", "age": 24 },
    { "name": "Veronica Konopelski", "age": 45 }
  ]
}

detect_schema_drift — field missing in OpenAPI, extra field in Zod:

{
  "drift_count": 2,
  "drifts": [
    {
      "field_path": "role",
      "drift_type": "missing_in_openapi",
      "zod_value": "string",
      "openapi_value": null
    },
    {
      "field_path": "email",
      "drift_type": "missing_in_zod",
      "zod_value": null,
      "openapi_value": "string"
    }
  ]
}

evaluate_schema_evolution — new required field breaks existing mocks:

{
  "breaking_change": true,
  "sample_count": 20,
  "invalid_mock_count": 20,
  "failure_reasons": [
    {
      "field_path": "status",
      "zod_code": "invalid_type",
      "expected": "string",
      "received": "undefined",
      "affected_mock_count": 20
    }
  ]
}

Scripts

npm run build        # compile TypeScript → dist/
npm run lint         # ESLint
npm run format       # Prettier --write
npm run format:check # Prettier check (used in CI)
npm test             # Vitest

License

MIT

Available Tools

10 tools
detect_schema_driftA

Compare a Zod schema in a TypeScript file against an OpenAPI spec — finds silent divergence. Use when Zod and OpenAPI docs are maintained separately and may have drifted apart. Reports missing fields, extra fields, type conflicts, and required/optional mismatches.

ParametersJSON Schema
NameRequiredDescriptionDefault
zod_file_pathYesAbsolute path to the .ts or .js file containing the Zod schema
openapi_file_pathYesAbsolute path to the OpenAPI spec (.yaml, .yml, or .json)
schema_export_nameYesName of the exported Zod schema variable (e.g. "UserSchema")
openapi_schema_nameNoSchema name in components.schemas to compare against. Defaults to schema_export_name.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavior. It states that the tool reports missing fields, extra fields, type conflicts, and mismatches, but does not elaborate on process, side effects, performance, or assumptions. For a comparison tool, this is minimal but not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three concise sentences: purpose, usage context, and output summary. Every sentence adds value with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of schema comparison and no output schema, the description adequately explains the tool's behavior and what it reports. It does not detail return format or limitations, but the provided list of detected issues gives sufficient completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and parameter descriptions in the JSON schema are clear (absolute paths, export names). The description adds context about what the tool does but does not enhance parameter semantics beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: comparing a Zod schema against an OpenAPI spec to find silent divergence. It specifies the verb ('compare'), resources ('Zod schema in TypeScript file' and 'OpenAPI spec'), and outcome, distinguishing it from sibling tools like read_schema_from_file or introspect_schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says to use this tool 'when Zod and OpenAPI docs are maintained separately and may have drifted apart', providing clear context. It does not mention when not to use or list alternatives, but the sibling tools imply other use cases (e.g., just reading a schema).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

evaluate_schema_evolutionA

Detect breaking changes when a Zod schema is tightened — before tests run. Generates mocks from the old schema, validates them against the new schema, and reports exactly which fields and constraints now reject previously valid data. Use when you changed a schema and want to know if existing test fixtures will break.

ParametersJSON Schema
NameRequiredDescriptionDefault
schema_file_pathYesAbsolute path to the TypeScript file containing the updated Zod schema
old_schema_contentNoFull content of the old schema file. Omit to automatically retrieve the last committed version via git show HEAD.
schema_export_nameYesName of the exported Zod schema variable

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It details the process (generates mocks, validates, reports) but does not discuss side effects, performance, or auth requirements. Adequate for a read-only analysis tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no wasted words. Front-loaded with the core purpose, then conditions and output. Ideal length for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers inputs and usage well, but lacks explanation of output format or return value. Since no output schema, the description should specify what 'reports exactly which fields and constraints' means in practice (e.g., format, file, console).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds value by clarifying behavior: 'omit to automatically retrieve last committed version via git show HEAD' for old_schema_content, and 'absolute path' for schema_file_path.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verbs ('detect breaking changes', 'generates mocks', 'validates', 'reports') and identifies the resource ('Zod schema evolution'). It clearly distinguishes from sibling tools like 'generate_valid_mock' or 'introspect_schema'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use: 'Use when you changed a schema and want to know if existing test fixtures will break.' Does not mention when not to use or alternative tools, but sibling list provides context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_boundary_violationsA

Generate intentionally invalid payloads based on a Zod schema — for negative testing. Use to answer: what invalid inputs should I test against this API?

ParametersJSON Schema
NameRequiredDescriptionDefault
schema_codeYesZod schema code

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully convey behavioral traits. It only states that it generates invalid payloads, but omits details like whether the operation is stateless, what the output format is, or any constraints on the input schema. This is insufficient for a generative tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long and front-loads the core purpose. It is concise, though the second sentence ('Use to answer...') is somewhat informal but still clear. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and only one parameter, the description is incomplete. It does not explain the output format, any prerequisites (e.g., schema must be valid Zod), or limitations. For a tool that generates test data, this missing information reduces completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single parameter schema_code, so the description does not need to add much. It merely repeats 'Zod schema code', adding no extra meaning beyond the schema's description. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'generate' and the resource 'invalid payloads based on a Zod schema' with the explicit purpose 'for negative testing'. It distinguishes itself from siblings like generate_valid_mock by focusing on invalid payloads.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear guidance on when to use the tool: 'for negative testing' and to answer 'what invalid inputs should I test against this API?'. However, it does not explicitly mention when not to use it or compare with alternatives, though the context of siblings implies distinct use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_exhaustive_union_violationsA

Generate violation payloads for every branch of a z.union() or z.discriminatedUnion() schema. Use when generate_boundary_violations only covers one union variant and you need full branch coverage.

ParametersJSON Schema
NameRequiredDescriptionDefault
schema_codeYesZod schema code — must evaluate to a z.union() or z.discriminatedUnion()

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It specifies the input requirement (must be a z.union or z.discriminatedUnion) but does not mention side effects, potential errors, or performance characteristics. For a generation tool, this is acceptable but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is exceptionally concise: two sentences, each with a distinct purpose. The first states the action, the second provides usage guidance. No extraneous words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema), the description is largely sufficient. It covers purpose and usage. However, it does not describe the return format (e.g., array of violation payloads), which would be helpful for completeness. The absence is minor given the straightforward nature.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already describes the parameter with high coverage (100%), including the requirement that it evaluate to a z.union() or z.discriminatedUnion(). The tool description adds no additional semantics beyond what is already in the schema, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Generate') and clearly identifies the resource ('violation payloads for every branch of a z.union() or z.discriminatedUnion() schema'). It explicitly distinguishes from the sibling tool generate_boundary_violations, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'Use when generate_boundary_violations only covers one union variant and you need full branch coverage.' This tells the agent exactly the condition under which this tool is preferred over an alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_mock_variantsA

Generate N structurally valid but value-diverse mocks from a Zod schema — for property-based testing. Use when generate_valid_mock is too deterministic and you need varied inputs to surface edge cases. Supply seed for reproducible output in CI.

ParametersJSON Schema
NameRequiredDescriptionDefault
seedNoSeed for reproducible output — omit for random variants each call
countNoNumber of mock variants to generate (default: 5, max: 50)
schema_codeYesZod schema code

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the transparency burden. It mentions that outputs are structurally valid but value-diverse and that a seed allows reproducibility. However, it does not disclose safety aspects (e.g., no destructive side effects) or any rate limits or authentication needs. Since generation tools are generally safe, this is adequate but not fully transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two sentences that front-load the purpose and usage, with no extraneous content. Every sentence serves a clear function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (3 parameters, no output schema), the description covers the key use cases and differentiates from siblings. It mentions seed for CI and the number of variants. It could explicitly state the output format (array of objects matching schema), but that is implicit for a mock generation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with all three parameters having descriptions in the schema. The description adds value by emphasizing the seed's role in CI reproducibility, but otherwise it does not significantly expand on schema descriptions. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool generates N structurally valid but value-diverse mocks from a Zod schema for property-based testing. It distinguishes from sibling generate_valid_mock by specifying when to use this tool (when deterministic output is insufficient).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says to use this tool when generate_valid_mock is too deterministic and you need varied inputs to surface edge cases. It also advises supplying a seed for reproducible output in CI. However, it does not explicitly state when not to use it (e.g., when a single valid mock is needed), but the contrast with generate_valid_mock implies the alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_valid_mockA

Generate valid mock data from a Zod schema string. Use to answer: what does a valid payload for this schema look like?

ParametersJSON Schema
NameRequiredDescriptionDefault
countNoNumber of mocks to generate (default: 1)
schema_codeYesZod schema code

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions generating mock data, but does not disclose side effects, prerequisites (e.g., valid Zod schema), or randomness. Adequate but not detailed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no fluff, front-loaded with the primary action and purpose. Very efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 parameters, no output schema), the description covers the core functionality and use case. It could benefit from mentioning the output format (e.g., object or array), but overall is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the description does not add meaningful information beyond the schema's parameter descriptions. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool generates valid mock data from a Zod schema string, and specifies the use case of answering what a valid payload looks like. It implicitly distinguishes from sibling tools that generate invalid or variant data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a usage hint ('Use to answer: what does a valid payload for this schema look like?'), but does not explicitly exclude any contexts or mention alternatives among siblings. Only implied guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

introspect_schemaA

Convert a Zod schema string to JSON Schema for LLM understanding. Use to answer: what is the structure and constraints of this schema?

ParametersJSON Schema
NameRequiredDescriptionDefault
schema_codeYesZod schema code (e.g., 'z.object({ name: z.string() })')

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the conversion functionality but does not disclose any additional behavioral traits like side effects, auth needs, or performance considerations. The description is adequate but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero waste. Both sentences serve a distinct purpose: the first states the core conversion, the second gives a practical use case.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple conversion tool with one parameter and no output schema, the description is complete. It tells the user the input format and the output type (JSON Schema). No additional information is necessary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema already documents the parameter. The description adds an example ('e.g., 'z.object({ name: z.string() })''), which adds meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool converts a Zod schema string to JSON Schema for LLM understanding. It uses a specific verb-resource pair ('Convert...Zod schema to JSON Schema') and distinguishes from sibling tools that focus on mocking, testing, and file reading.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use to answer: what is the structure and constraints of this schema?', providing clear context for when to use this tool. However, it lacks explicit when-not-to-use guidance or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_schema_from_fileA

Read a Zod schema directly from a TypeScript or JavaScript file. Use to answer: what schema is defined in this file?

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the .ts or .js file containing the Zod schema
export_nameNoName of the exported schema variable. If omitted, extracts the first Zod expression found.

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden for behavioral transparency. It does not mention side effects, safety, authentication, rate limits, or error handling. For a read operation, it is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is only two sentences, front-loaded with the main action, and contains no redundant information. Every word serves a purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with 2 parameters and no output schema. However, the description does not explain the return value, error conditions, or expected output format. It is adequate but leaves gaps for a complete understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already documents both parameters well. The description adds a usage hint but does not significantly enhance meaning beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('read'), resource ('Zod schema from a TypeScript or JavaScript file'), and provides a specific question it answers ('what schema is defined in this file?'). This distinguishes it from siblings like introspect_schema or generate_valid_mock, which have different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a clear usage context ('Use to answer: what schema is defined in this file?') but lacks explicit when-not-to-use or alternatives among siblings like introspect_schema. It gives good guidance but not full differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scaffold_api_contract_testA

Generate an API contract test or mock boilerplate for Playwright, Jest, Vitest, or MSW. Use to answer: how do I write a test that validates this API endpoint against this schema?

ParametersJSON Schema
NameRequiredDescriptionDefault
methodNoHTTP methodGET
base_urlNoBase URL of the APIhttp://localhost:3000
endpointYesAPI endpoint path (e.g., /api/users)
frameworkNoTesting framework to generate code forplaywright
test_nameNoName of the generated testAPI Contract Validation
schema_codeYesZod schema code for the response body

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description bears full responsibility for disclosing behavioral traits. It does not mention safety, idempotency, permissions, or any side effects. The only implied behavior is code generation, which is likely read-only, but this is not explicitly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the action and followed by the use case. Every word is meaningful, and it avoids redundancy. It is concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 6 parameters, no output schema, and no annotations, the description is minimally complete. It explains the tool's purpose and usage but does not elaborate on what the generated output looks like or any prerequisites. It meets basic requirements but lacks depth.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already describes all parameters. The tool description adds minimal extra meaning, only mentioning the frameworks in the first sentence, which aligns with the 'framework' parameter. It does not provide additional context beyond what the schema offers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it generates API contract tests or mock boilerplate for specific frameworks. It uses a specific verb ('Generate') and resource ('API contract test or mock boilerplate'), and distinguishes from sibling tools like 'generate_valid_mock' which generates mock data, not test code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly answers 'how do I write a test that validates this API endpoint against this schema?', clearly indicating the usage context. However, it does not mention when not to use or suggest alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

suggest_contract_fixA

Validate a JSON payload against a Zod schema and suggest fixes for each violation. Use to answer: why does this payload fail validation, and how do I fix it?

ParametersJSON Schema
NameRequiredDescriptionDefault
payloadYesJSON string of the failing payload
schema_codeYesZod schema code

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states validation and fix suggestions but does not disclose behavioral traits such as whether it is read-only, requires permissions, or what side effects occur. Missing clarity on whether it modifies state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no fluff. The first sentence states purpose and mechanism, the second provides a concrete use case. Highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With two simple parameters and no output schema, the description is adequate but incomplete: it does not explain the format of the returned fixes (e.g., list of suggestions, structured errors). Agents may need more guidance on the return value.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (both parameters described). The description reiterates the schema's descriptions without adding meaningful new semantics or usage details beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool validates a JSON payload against a Zod schema and suggests fixes. The verb 'validate' and phrase 'suggest fixes' is specific and distinguishes it from sibling tools that generate mocks or violations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes an explicit use-case question ('Use to answer: why does this payload fail validation, and how do I fix it?'), indicating when to use. However, it lacks when-not-to-use guidance or mention of alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 10 tool updatesv0.2.0
    • First observeddetect_schema_drift
    • First observedevaluate_schema_evolution
    • First observedgenerate_boundary_violations
    • First observedgenerate_exhaustive_union_violations
    • First observedgenerate_mock_variants
    • First observedgenerate_valid_mock
    • First observedintrospect_schema
    • First observedread_schema_from_file
    • First observedscaffold_api_contract_test
    • First observedsuggest_contract_fix

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct operation on Zod schemas: reading, introspecting, generating various mocks, testing, fixing, and comparing. No two tools have overlapping purposes.

Naming Consistency5/5

All tool names use a consistent verb_noun pattern in snake_case, making the set predictable and easy to navigate.

Tool Count5/5

With 10 tools, the server is well-scoped for its purpose—covering schema analysis, mock generation, testing, and validation without being overwhelming or sparse.

Completeness5/5

The tool set covers the full workflow: reading schemas, understanding their structure, generating valid/invalid mocks, creating tests, suggesting fixes, and tracking changes. No obvious gaps.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vola-trebla/zod-contract-mock-forge-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server