Skip to main content
Glama

test_mock

Fire a real HTTP request to the local mock engine to verify a mock endpoint returns the expected response. Use this AFTER creating or updating a mock to self-verify correctness. Test EACH rule scenario by sending different request bodies/headers that should match each rule. Check the 'X-Rule-Matched' response header to confirm which rule fired. If the wrong rule fires or no rule fires, use get_request_logs to debug the condition mismatch. You can also use bodies from get_saved_requests as test inputs.

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": {
      "projectSlug": "<projectSlug>",
      "method": "<method>",
      "path": "<path>"
    },
    "name": "test_mock"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoOptional request body string (JSON or form data) to send with the request
pathYesExact path to call, e.g. /v1/users/42 or /orders/abc123. Path variables must be filled with actual values.
methodYesHTTP method to use for the test request (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, etc.)
headersNoOptional key-value map of request headers, e.g. {"Authorization": "Bearer token123", "Content-Type": "application/json"}
projectSlugYesThe slug of the project (from list_projects). Used to build the engine URL: /mock/{slug}/{path}

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / method / description
      Previous value: -"HTTP method to use for the test request (GET, POST, PUT, DELETE, PATCH, etc.)"New value: +"HTTP method to use for the test request (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, etc.)"
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries full burden and does disclose key behavior: it fires a REAL HTTP request at the local mock engine and returns an 'X-Rule-Matched' header indicating which rule fired. It does not state whether the test traffic is recorded in logs/issues, what auth or cleanup is required, or what the overall response shape looks like, so a bit of behavioral context is still missing.

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 with the core action, then progressively adds verification workflow and debugging fallback. Sentences are dense and mostly earn their place, though the guidance could be tightened slightly without losing meaning.

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?

No output schema exists, and the description compensates by pointing at the 'X-Rule-Matched' response header as the key return signal. Remaining gaps are minor: it doesn't describe whether test traffic pollutes logs or how errors surface, but for a 5-parameter tool with full schema coverage this is close to 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?

Schema description coverage is 100%, so every parameter including the nested headers map is already documented. The description adds practical usage color around varying bodies and headers per rule, but no new format or constraint information beyond what the schema provides, which matches the baseline 3.

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?

States a specific verb and resource: fire a real HTTP request at the local mock engine to verify a mock endpoint returns the expected response. This is clearly distinguishable from siblings like get_request_logs, create_mock, or debug_last_request, and an agent can select it without opening a schema.

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?

Gives explicit ordering guidance ('use this AFTER creating or updating a mock to self-verify') plus a fallback path ('if the wrong rule fires... use get_request_logs to debug'). It also names a complementary source of inputs ('bodies from get_saved_requests'), covering when to use and what to do instead.

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