Skip to main content
Glama

Test a full OpenAPI spec (paid, $2.00)

api_test_spec
Read-only

PAID over x402 inside this tool call ($2.00 USDC on Base, Polygon or Arc): validate an OpenAPI spec (including broken $refs) and probe every endpoint, reporting how many work, which are broken, and by what failure class. Endpoints without sample values are reported as needs-sample-values, not faked. Public endpoints only in v1. Call once without payment to get the x402 PaymentRequired, then call again with the signed payment in _meta["x402/payment"].

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "api_test_spec"
  }
}

Input Schema

NameRequiredDescriptionDefault
specNoInline OpenAPI spec JSON (instead of specUrl).
samplesNoSample values per endpoint, keyed by 'METHOD /path'.
specUrlNoURL of the OpenAPI spec JSON.

Output Schema

NameRequiredDescriptionDefault
baseNoServer base URL used
_paidNox402 receipt
totalNoEndpoints probed (capped at 50)
brokenNoEndpoints that are broken
cappedNoSpec had more than 50 endpoints
resultsNoPer-endpoint results: method, path, probed, status, verdict, failure class, schema
versionNoOpenAPI version
workingNoEndpoints that work
specValidNoSpec is valid OpenAPI
specErrorsNoSpec validation errors
needsSamplesNoEndpoints needing sample values

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnly, openWorld, non-idempotent, non-destructive), the description discloses cost and payment rail ($2.00 USDC on Base, Polygon or Arc), the two-step x402 handshake, the honesty policy that unsampled endpoints are reported as needs-sample-values rather than faked, the v1 public-endpoint scope limit, and the failure-class reporting shape. That is substantial behavioral context an agent cannot get from structured fields.

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?

Cost and payment rail are front-loaded, and the sentence ordering moves from what/price to behavior to invocation mechanics. The first sentence is dense and packs validation, probing, and reporting into one long clause, but no sentence is wasted.

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 need not explain return values, and it covers cost, payment steps, and scope limits well. The one gap is that no parameter is marked required and the description never says that one of spec or specUrl must be supplied for the call to succeed.

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 the baseline is 3. The description hints at the spec/specUrl choice and at samples ('Endpoints without sample values are reported as needs-sample-values'), but it does not explain the 'METHOD /path' keying requirement or that inline spec and specUrl are alternatives beyond what the schema already says.

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 uses a specific verb and resource ('validate an OpenAPI spec ... and probe every endpoint') and states the report contents (how many work, which are broken, failure class). It does not name or explicitly contrast with the likely sibling tools api_audit and api_diagnose, so an agent must infer that this one operates on a full spec rather than a single endpoint.

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?

Clear procedural guidance is given for the paid flow: call once without payment to receive the x402 PaymentRequired, then retry with the signed payment in _meta["x402/payment"]. Constraints ('Public endpoints only in v1') and the needs-sample-values behavior are stated, but there is no explicit when-to-use-this-vs-sibling guidance for api_audit/api_diagnose.

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.