Skip to main content
Glama

start_mock_server

Launch a local HTTP mock server with custom routes, methods, status codes, and response bodies to test APIs without a real backend.

Instructions

Start a local HTTP mock server on a given port. Define routes with method, path, status, and response body. Useful for testing without a real backend.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "routes": "<routes>"
    },
    "name": "start_mock_server"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNo
routesYes
verboseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6-beta

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden, and it omits key behavior: whether the server runs in the background or blocks, what happens on a port conflict, and whether the started server persists until stopped. It does establish that a real local listener is created (a side-effecting operation), but the lifecycle and failure modes an agent needs are unstated.

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?

Three short sentences with the core action front-loaded and no filler. The structure is efficient, though the middle sentence is a bare field list rather than integrated with the port setup.

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 three-parameter, side-effecting tool with no annotations and no output schema, the definition covers what to configure but not what comes back or how the server's lifetime is terminated. It is adequate to attempt a call, but incomplete for correct lifecycle management.

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 0% at the top level, so the description must compensate, and it partially does by enumerating the route fields ('method, path, status, and response body') and the port. It says nothing about 'verbose' and covers only four of the route sub-fields, so the compensation is incomplete.

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 names a specific verb and resource ('Start a local HTTP mock server') and adds scope ('on a given port'), so the agent knows exactly what the tool does. It does not differentiate itself from siblings such as stop_mock_server or mock_server_log, which prevents a 5.

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

Usage Guidelines3/5

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

'Useful for testing without a real backend' gives an implied usage context but no explicit when-to-use/when-not guidance. It never mentions the paired stop_mock_server cleanup step or that mock_server_log exists for inspecting traffic, leaving lifecycle routing to inference.

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