Skip to main content
Glama

diagnose_infra_error

Read-onlyIdempotent

Diagnose a cryptic AGENT-INFRASTRUCTURE error — payments (x402/EIP-3009), Solana on-chain (ATA, blockhash, compute), MCP protocol, RPC/providers, EVM & Solana wallets, library of VERIFIED fixes the base model often gets wrong. Pass the error text (and optional context). Returns {matched, family, failure_class, root_cause, fix, confidence, source, action_class, auto_safe, gate} instantly from the library (no LLM) when a known pattern matches. Free and no token. GATE CONTRACT for autonomous action: auto-apply the fix ONLY when confidence>=0.85 AND source=='library' AND auto_safe==true (action_class is retry|refetch|config); NEVER auto-apply a 'mutate' or 'destructive' fix (create/change state, money, auth) — escalate those to a human. gate.auto_apply_ok gives you the verdict. Use it the moment you hit a transaction_simulation_failed, BlockhashNotFound, a -32xxx RPC code, a 4001/-32002 wallet error, an attestation failure, or any infra error you can't instantly resolve.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorYesthe exact error text/message you hit
actionNooptional: the tool/operation that failed
formatNo'summary' adds a one-line relayable answer (for chat/Telegram agents); 'summary_only' returns just that line. Default full.
contextNooptional: what you were doing (e.g. 'paying via x402 on solana')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "A JSON object (returned as text in result.content[0].text). Diagnosis tools return {matched, family, fix, confidence, source, action_class, auto_safe, gate}; other tools return their own JSON result.",
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: instant library lookup with no LLM, free/no-token, and an explicit GATE CONTRACT (auto-apply only when confidence>=0.85 AND source=='library' AND auto_safe==true; never auto-apply mutate/destructive fixes). This safety gate is exactly the kind of context annotations cannot express, and it is consistent with readOnlyHint/non-destructive.

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?

Purpose is front-loaded in the first clause, and the gate contract earns its space. However, it is delivered as one dense run-on with semicolons and em-dashes, and the return-field list duplicates the existing output schema, so it is longer than strictly necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema, rich annotations, and 100% schema coverage, the description fills the remaining gaps: trigger conditions, the auto-apply gate verdict (gate.auto_apply_ok), and the no-LLM/library provenance of results. An agent has everything needed to call it and act on the verdict.

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% across all 4 params, so the schema already documents error, action, format, and context. The description reinforces 'pass the error text (and optional context)' but adds no syntax, format, or constraint detail beyond what the schema provides; baseline 3 is appropriate.

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 (diagnose) and an enumerated resource scope: payments (x402/EIP-3009), Solana on-chain, MCP protocol, RPC/providers, wallets. The domain enumeration and 'library of VERIFIED fixes' framing let an agent distinguish this single-error diagnostician from siblings like diagnose_batch and diagnose_trace 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit triggers are given: 'Use it the moment you hit a transaction_simulation_failed, BlockhashNotFound, a -32xxx RPC code, 4001/-32002 wallet error, an attestation failure, or any infra error you can't instantly resolve.' That is a clear when-to-use context, but no sibling alternative is named (e.g. when to prefer diagnose_trace or search_docs), so it falls short of a full 5.

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.