Skip to main content
Glama

mock_endpoint

Set up a mock HTTP endpoint by providing method, path, and response. No OpenAPI spec required.

Instructions

Quickly mock a single HTTP endpoint without writing an OpenAPI spec. Pass method (default GET), path (the EXACT HTTP path the user described, including all segments), and the response body (object → JSON, string → text). The bridge writes the response into a managed static dir at ~/.cache/mockzilla-mcp/mocks/ and (re)starts a single shared mockzilla server pointing at it.

Pass path AS IS. Do NOT prepend or duplicate any segment. The bridge derives the service name from the first segment for internal grouping, but it does not change the URL the user hits. Examples: • User says GET /pets/{id} → call mock_endpoint with path=/pets/{id} → URL is http://HOST:PORT/pets/{id} • User says POST /orders → path=/orders → URL is http://HOST:PORT/orders • User says GET /v1/users/me → path=/v1/users/me → URL is http://HOST:PORT/v1/users/me

Path placeholders like {id} are stored as literal directory names — by default ALL placeholder values share the same response. To return different responses for specific values, call mock_endpoint again with a literal value (e.g. /pets/123).

Calling this multiple times accumulates endpoints in the same server — adding POST /pets after GET /pets/{id} keeps both. Mutually exclusive with serve_locally: stop any ad-hoc server first. See mockzilla_docs_search('static directory') for the underlying convention.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoGET
pathYesPath beginning with /. First segment is the service name.
responseNoResponse body. Object → JSON. String → text. Default {}.
statusNo
content_typeNoOverride content type. Inferred from response type if omitted (object → application/json, string → text/plain).
Behavior5/5

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

Without annotations, the description fully discloses behavioral traits: writes to a managed directory, (re)starts a shared mockzilla server, accumulates endpoints, handles path placeholders as literal directory names, and is mutually exclusive with serve_locally. No annotation contradiction.

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 detailed and front-loaded with essential info, but slightly verbose. Every sentence adds value, though could be trimmed slightly. Examples aid clarity but lengthen text.

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?

Covers core behaviors and side effects thoroughly, but does not explicitly state what the tool returns (e.g., confirmation, URL). With no output schema, a brief mention of return value would improve completeness for an agent.

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

Parameters5/5

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

Adds significant meaning beyond the input schema: explains each parameter with examples, default behavior, and nuances (e.g., response type inference, path placeholders). The description compensates for any schema gaps, with 60% schema description coverage.

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: 'Quickly mock a single HTTP endpoint without writing an OpenAPI spec.' It uses specific verbs and resources, and distinguishes from siblings like serve_locally and clear_mock_endpoints by explaining accumulation and mutual exclusivity.

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?

Provides explicit when-to-use guidance, including parameter defaults and path handling. Warns against prepending segments, explains placeholders, and contrasts with serve_locally ('Mutually exclusive... stop any ad-hoc server first'). Includes examples for correct usage.

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/mockzilla/mockzilla-mcp'

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