Skip to main content
Glama

Start mock server

start_mock

Start a localhost mock server that serves saved example responses for each saved request path, letting you develop against an API that is not running.

Instructions

Start a mock server on localhost that answers each saved request's path with its saved example response. Use it to develop against an API that is not running. Returns the address and, per request, whether it is served and why not.

Input Schema

NameRequiredDescriptionDefault
portNoThe localhost port to listen on. Defaults to 4010.
delay_msNoWait this long before every answer.

Output Schema

NameRequiredDescriptionDefault
routesNo
addressNo
runningNo
recentRequestsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.19

TDQS

A4/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false), so the bar is lower. The description adds useful output context (address plus per-request served status and failure reason), but omits the key lifecycle fact that the server keeps running until stop_mock and gives no hint about non-idempotent behavior or port-in-use failures, which is what an agent most needs to know before starting a long-lived process.

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?

Three short sentences, each earning its place: what it does, when to use it, and what comes back. Purpose is front-loaded and the use case follows immediately with no 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?

With an output schema present, the description needn't explain the return shape, and it correctly summarizes it in one clause. What remains missing is lifecycle context — that the server persists until stop_mock and what happens on a port conflict — but nothing an agent needs to formulate the call itself is absent.

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% with bounds and a documented default port of 4010, so the schema carries the parameter documentation. The description contributes nothing about port choice or delay_ms semantics, making this the baseline case where structure does the work.

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?

Names a specific verb and resource (Start a mock server) and explains the mechanism precisely: it answers each saved request's path with its saved example response. This clearly separates it from stop_mock, mock_status, and send_request without needing to open any 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?

Explicitly states the use case: develop against an API that is not running, which tells the agent when to reach for it. It stops short of naming stop_mock as the follow-up or saying when to prefer mock_status instead, so the alternatives are only implied.

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