Skip to main content
Glama
stellar-mcp

stellar-mcp

by ijele-don

diagnose_soroban_error

Decode Soroban host error strings into root cause, explanation, and suggested fix, optionally resolving custom contract error names.

Instructions

Decode a Soroban host error string (e.g. "HostError: Error(Contract, #4)" or "Error(Storage, MissingValue)") into root cause, explanation, and suggested fix. Optionally resolves custom contract error names.

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": {
      "error_message": "<error_message>"
    },
    "name": "diagnose_soroban_error"
  }
}

Input Schema

NameRequiredDescriptionDefault
networkNoOptional network override (defaults to configured STELLAR_NETWORK).
contract_idNoOptional contract ID (C...) to look up #[contracterror] enum names
error_messageYesRaw Soroban error string

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description does the disclosure work itself: it characterizes the tool as a pure decode/diagnosis operation producing explanation and fix suggestions, and flags that custom contract error name resolution is optional. It omits whether the optional lookup performs a network request or can fail/slow down, which matters for a diagnostic tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, front-loaded with the action and followed by the payoff, with inline example error strings instead of abstract prose. No filler or redundancy.

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

Completeness3/5

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

For a three-parameter tool with no output schema, the description usefully sketches the response shape (root cause, explanation, suggested fix) and accepted input formats. It leaves open the network behavior and failure modes of the optional contract-name resolution, which is the main remaining gap.

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%, so all three parameters are already documented, establishing the baseline of 3. The description only reinforces that contract_id drives optional custom error-name resolution, adding no syntax, format, or precedence detail 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?

Names a specific verb (Decode) plus the resource (Soroban host error string) and even previews the return contents (root cause, explanation, suggested fix). It doesn't explicitly contrast itself with the similarly-scoped decode_xdr sibling, so an agent must infer the boundary, but the intent is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is only implied: an agent should call this when it holds a raw host error string, with two example inputs making that concrete. There is no statement of when to prefer this over decode_xdr or fetch_contract_spec, nor any exclusion or prerequisite (e.g. network access needed for contract name resolution).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.