Skip to main content
Glama

create_mock_api

Create an expiring HTTP or WebSocket mock. For WebSockets, set routes to [] and configure echo, welcome messages or exact text replies in websocket.

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": {
      "name": "<name>",
      "routes": "<routes>"
    },
    "name": "create_mock_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
llmNoText-only OpenAI Chat Completions or Anthropic Messages test double. Empty routes required. Estimated usage; streams are limited to five seconds. Does not run a model or execute tools.
crudNo
echoNoReflect requests; requires empty routes and no CRUD.
nameYesAPI name, up to 80 characters.
routesYes
websocketNo
visibilityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / routes / items / properties / graphql
      Added value: +{
      +  "properties": {
      +    "operationName": {
      +      "maxLength": 80,
      +      "type": "string"
      +    },
      +    "variables": {
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "operationName"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / routes / items / properties / scenario
      Added value: +{
      +  "properties": {
      +    "from": {
      +      "maxLength": 48,
      +      "type": "string"
      +    },
      +    "name": {
      +      "maxLength": 48,
      +      "type": "string"
      +    },
      +    "to": {
      +      "maxLength": 48,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "from",
      +    "to"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare the mutation/safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false). The description adds one genuinely useful behavioral fact not in the annotations: the mock is 'expiring'. It does not say how long mocks live, whether they require auth, or what happens when they expire, which matters for a create operation. The safety profile is covered by annotations, so a 3 is appropriate.

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?

Two sentences, front-loaded with the core purpose before the WebSocket configuration rule. Minimal waste; the only mild inefficiency is that the WebSocket sentence packs three separate sub-behaviors into one clause rather than being scannable.

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 7-parameter tool with nested objects and no output schema, the description covers the HTTP/WebSocket fork and the highest-risk configuration pitfall (empty routes for WS), which is the most likely source of a wrong call. It leaves out expiry semantics, visibility, and when the llm/crud modes are appropriate, relying on the verbose input schema for those. Adequate but not complete.

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?

With 43% schema description coverage the description should compensate, and it does partially: it explains the routes=[] requirement and that echo, welcome messages, and exact text replies live under websocket. It says nothing about name, visibility, crud, or llm modes, though the schema itself documents those nested objects in detail (including the five-second stream limit for llm). Moderate added value over the schema.

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 ('Create an expiring HTTP or WebSocket mock') and splits the two variants into HTTP vs WebSocket, which lets an agent distinguish the two call shapes. It stops short of naming a sibling (e.g., call_mock_api or inspect_mock_api) to contrast with, so it is clear but not sibling-differentiating.

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?

One concrete usage rule is given: for WebSockets set routes to [] and configure the websocket object. That is real guidance for a non-obvious case. There is no statement of when to prefer this tool over its siblings or whether a mock must be created before call_mock_api can be used, so overall guidance is implied rather than explicit.

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.