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.

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, 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. 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 provided, the description carries the full disclosure burden and does well: it states the request is real and hits the local mock engine, and it surfaces the diagnostic contract (the 'X-Rule-Matched' response header identifies which rule fired). It stops short of saying whether the call is logged or persists state, or what the full response shape is.

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?

Five sentences, all actionable, with purpose front-loaded before the sequencing advice and the debugging fallback. It is dense but nothing is filler; it could be tightened slightly by merging the rule-testing and header-checking guidance.

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?

There is no output schema, so the description correctly discloses the one return detail that matters for interpretation, the 'X-Rule-Matched' header. It doesn't cover whether the mock's status code and body are returned verbatim or whether the call is recorded in the request log, which an agent would want to know.

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% and every parameter, including the nested headers map, is documented in the schema itself. The description adds only indirect hints, such as using bodies from get_saved_requests as test inputs, but no format or constraint detail beyond what the schema already states.

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 opens with a specific verb and resource: fire a real HTTP request at the local mock engine to verify a mock endpoint returns the expected response. That is clearly distinguishable from siblings like debug_last_request or get_request_logs, which are inspection tools rather than live-request testers.

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?

It gives explicit sequencing ('use this AFTER creating or updating a mock'), a required testing pattern ('test EACH rule scenario by sending different request bodies/headers'), and names the fallback tool ('use get_request_logs to debug the condition mismatch') under a stated failure condition.

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