Skip to main content
Glama

Diagnose one API endpoint live (paid, $0.50)

api_diagnose
Read-only

PAID over x402 inside this tool call ($0.50 USDC on Base, Polygon or Arc): actually call one API endpoint and return the verdict, failure class, auth diagnostics, response-schema validation, deterministic corrections, and a working example request (curl + JSON). Public endpoints only in v1 — no credentials are accepted. Call once without payment to get the x402 PaymentRequired, then call again with the signed payment in _meta["x402/payment"].

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": {
      "url": "<url>"
    },
    "name": "api_diagnose"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesTarget endpoint URL, e.g. 'https://api.example.com/v1/users'.
bodyNoRequest body for POST/PUT/PATCH.
specNoOptional inline OpenAPI spec JSON to check against.
queryNoQuery parameters.
methodNoHTTP method, default GET.
docsUrlNoOptional OpenAPI spec or docs URL to check against.
headersNoRequest headers (no credentials in v1).

Output Schema

NameRequiredDescriptionDefault
urlNoEndpoint diagnosed
authNoAuth diagnostics: required, status, www-authenticate, scheme, declared security
specNoSpec check: valid, version, errors
_paidNox402 receipt
errorNoFetch error, or null
methodNoHTTP method
schemaNoResponse-schema validation: valid, issues
statusNoHTTP status, or null if unreachable
verdictNoworking | working_but_slow | broken
latencyMsNoProbe latency in ms
contentTypeNoResponse content-type
correctionsNoDeterministic corrections, in order
failureClassNoworking | auth | not_found | wrong_method | bad_request | server_error | timeout | schema_mismatch | ...
exampleRequestNoWorking example request: curl + JSON request
responseExcerptNoResponse body excerpt

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

With annotations already covering the safety profile, the description still adds substantial non-schema behavior: an explicit $0.50 USDC price, the accepted chains (Base, Polygon, Arc), the two-call payment handshake, and the no-credentials v1 limit. One tension is left unresolved: the schema permits POST/PUT/PATCH with a request body, which does not obviously square with readOnlyHint=true and idempotentHint=false, and the description never addresses whether write methods are safe or supported.

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 paid attribute and the core action, then the payment procedure, then the v1 constraint — a sensible priority order. It is a single dense paragraph with some redundancy (the $0.50 price appears in the title, the opening clause, and again in the currency detail), but no sentence is filler.

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?

For a paid, open-world live-call tool with 7 parameters and an output schema, the definition covers price, payment handshake, credential limits, and target scope, which is what an agent needs before invoking. The remaining gap is method semantics — whether non-GET calls are supported given the read-only annotation — and the absence of any stated rate limit or failure behavior when payment is malformed.

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 and the schema already explains url, method, body, spec, docsUrl, query, and headers. The description adds only one real parameter constraint — that headers must not carry credentials in v1 — and says nothing about how spec vs docsUrl interact or how method selection affects the verdict. Nothing here compensates meaningfully beyond 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 concrete verb and resource — "actually call one API endpoint" — and enumerates precisely what comes back (verdict, failure class, auth diagnostics, schema validation, corrections, curl example). The word "actually" implicitly separates it from static analysis siblings such as api_audit or api_test_spec, but no sibling is named outright, so the differentiation is inferred rather than stated.

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?

Usage is spelled out well for the mechanics: call once to receive the x402 PaymentRequired, then call again with the signed payment in _meta["x402/payment"]. Hard constraints are declared (public endpoints only in v1, no credentials accepted). What is missing is guidance on when to pick this over api_audit or api_test_spec — the choice between live call and spec-based audit is left to the agent.

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.