Skip to main content
Glama

api mock

api_mock
Read-only

Realistic mock responses from an OpenAPI spec (JSON/YAML, inline or URL) or a JSON Schema: pick the operation, status and count (1-20) and get distinct, internally consistent bodies that honour every type, format, enum and required field, with notes on anything the spec left ambiguous. For tests, demos and front-ends built before the backend. $0.008. Costs $0.008 USDC per call (x402).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "api_mock"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNo
schemaNoor a JSON Schema of the response
statusNo
openapiNospec object, YAML/JSON string, or URL
operationNoe.g. GET /orders/{id}

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description adds genuinely new behavioral context: the 1-20 count bound, that returned bodies are distinct and internally consistent and honour types/formats/enums/required fields, that it emits notes on spec ambiguities, and the per-call price ($0.008 USDC via x402). It does not contradict the annotations. It could have noted the extra latency/validation behaviour implied by remote URL fetching, but the added disclosure is solid.

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?

Front-loaded and dense: capability, inputs, output guarantees, then audience. The only waste is the redundant pricing tail — "$0.008. Costs $0.008 USDC per call (x402)." repeats the same figure twice in consecutive sentences.

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?

For a read-only, no-output-schema tool this covers what an agent needs to invoke it: inputs, input formats, count bounds, output characteristics and cost. The one omission is that all five parameters are optional, so the description never states that at least one of openapi or schema (plus operation) is effectively required for a meaningful call.

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 60% schema coverage across 5 parameters, the description meaningfully supplements the schema: it clarifies that openapi accepts JSON/YAML as an inline string, an object, or a URL, that schema means a response JSON Schema, and it supplies the undocumented count range (1-20) and the operation/status selection semantics. Nothing critical about the inputs is left ambiguous.

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?

States a specific verb+resource: generating realistic mock response bodies from an OpenAPI spec or JSON Schema, with a precise mechanism (pick operation, status, count). It is clearly distinguishable from most siblings by its spec-driven input, but it never names or contrasts with the nearest neighbour (fake_data) or with openapi_inspect/json_schema_infer, so sibling differentiation is left implicit.

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?

"For tests, demos and front-ends built before the backend" gives a clear, concrete usage context that tells the agent when this tool is appropriate. There is no when-not guidance and no pointer to alternatives such as fake_data for schema-less data, so it stops short of full routing 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.

Resources