Skip to main content
Glama
vola-trebla

zod-contract-mock-forge-mcp

by vola-trebla

detect_schema_drift

Detects differences between a Zod schema and an OpenAPI spec, highlighting missing or extra fields, type conflicts, and required/optional mismatches to prevent contract drift.

Instructions

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.

Input Schema

TableJSON 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.
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.

Install Server

Other Tools

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