Skip to main content
Glama
rog0x

mcp-testing-tools

by rog0x

generate_api_mock

Generate realistic JSON mock responses for REST endpoints from a field schema. Define endpoint, fields, and status code to produce test data for API development.

Instructions

Generate mock API responses from a schema. Creates realistic JSON responses for REST endpoints based on field names and types.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of records to generate (default: 1, max: 100)
fieldsYesArray of field schemas. Each field has: name (string), type (string|number|boolean|date|array|object), optional items (for arrays), optional fields (for nested objects), optional nullable, optional enum.
methodNoHTTP method (default: GET)
endpointYesAPI endpoint path, e.g. "/api/v1/users"
status_codeNoHTTP status code for the response (default: 200)
wrap_in_envelopeNoWrap response in { success, data, meta } envelope (default: true)
Behavior2/5

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

There are no annotations, so the description carries the full behavioral disclosure burden. It only states that mock responses are generated and based on field names/types; it does not disclose whether the tool makes network calls, whether results are deterministic, whether it can overwrite anything, or any limitations beyond what the schema shows.

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 short sentences with no filler. The core purpose is front-loaded, and the second sentence adds valuable context about realistic JSON and the generation approach without repeating the schema's details.

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?

For a moderately complex tool with 6 parameters and no output schema, the description is minimal but not inadequate. It communicates the main deliverable, and the schema covers parameters thoroughly. However, it lacks usage context relative to sibling tools and does not describe the response envelope or other behavioral nuances that would help an agent fully anticipate the output.

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 baseline is 3 even without additional parameter details in the description. The phrase 'based on field names and types' adds a small layer of meaning related to the fields parameter, but the description does not significantly expand on the schema's already detailed parameter documentation.

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

Purpose4/5

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

The description uses a specific verb and resource: 'Generate mock API responses from a schema' and further specifies 'realistic JSON responses for REST endpoints.' This is clear and distinguishable from the sibling generate_mock_data, though it does not explicitly name or contrast the siblings.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use this tool versus alternatives like generate_mock_data or generate_tests. It implies usage through its purpose but provides no explicit conditions, prerequisites, or exclusions.

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/rog0x/mcp-testing-tools'

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