Skip to main content
Glama

api-contract-validator

generate_mock_from_spec

Generate mock response data from an OpenAPI spec. Uses examples, defaults, formats, and type heuristics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoTarget path (optional; generates all if omitted)
specYesOpenAPI spec JSON object
methodNoHTTP method (used with path)
statusCodeNoResponse status code (default: 200)200

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals that generation uses heuristics (examples, defaults, formats, type), giving some insight into the method, but it does not state expected output structure, determinism, or any limitations (e.g., handling of missing examples). This is adequate but not rich.

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 consists of two concise, front-loaded sentences. The first states the core purpose, and the second adds useful methodological context. No redundant or filler words are present.

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 has moderate complexity (4 params, nested spec object, no output schema). The schema covers parameters well, but the description omits any details about the return format or behavior when generating across multiple paths. Given the lack of an output schema, the description should ideally clarify what the generated mock data looks like, leaving a clear gap.

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 provides descriptions for all four parameters (100% coverage), so the description adds no additional parameter-level meaning. The mention of heuristics relates to the spec content, not the tool's parameters, so the baseline of 3 applies.

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 resource ('mock response data') tied to a clear source ('OpenAPI spec'), making the tool's function unmistakable. It also mentions the heuristic approach (examples, defaults, formats, type), which further clarifies its scope and distinguishes it from the sibling validation/diff/lint tools.

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 clearly implies when this tool is appropriate—when you need mock data from an OpenAPI spec—but it does not explicitly mention alternatives or exclusions. The sibling tools are functionally distinct, so the context is clear, yet there is no explicit 'use this instead of X' guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool serves a distinct purpose: validation, linting, breaking change detection, request/response diffing, and mock generation. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern (check_, diff_, generate_, lint_, validate_), making the naming predictable and easy to navigate.

Tool Count5/5

With 5 tools, the set is well-scoped for an API contract validator. Each tool covers a distinct aspect of specification validation and testing without excess or redundancy.

Completeness5/5

The toolset comprehensively covers the core domain: structural validation, linting, breaking change detection, runtime request/response validation, and mock generation. No obvious gaps remain for typical contract-validation workflows.