Skip to main content
Glama
stellar-mcp

stellar-mcp

by ijele-don

analyze_contract_storage

Inspect Soroban contract instance storage and optional LedgerKey XDRs to compute remaining TTL, flag oversized entries, and identify expiring or archived storage before it causes issues.

Instructions

Inspect a Soroban contract instance storage (and optional extra LedgerKey XDRs), compute remaining TTL in ledgers/days, and flag oversized or expiring/archived entries.

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": {
      "contract_id": "<contract_id>"
    },
    "name": "analyze_contract_storage"
  }
}

Input Schema

NameRequiredDescriptionDefault
networkNoOptional network override (defaults to configured STELLAR_NETWORK).
contract_idYesSoroban contract ID (C...)
additional_keysNoOptional base64 LedgerKey XDRs (max 50)
size_threshold_bytesNoFlag entries larger than this byte size (default 1024)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden; it does disclose the analytical behaviors beyond a plain read (TTL computation in ledgers and days, flagging oversized/expiring/archived entries). It omits that 'Inspect' is a read-only operation, whether it queries the live network or the configured one, and how archived/expired entries are reported.

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?

A single dense sentence with no filler, front-loaded with the primary object of inspection and followed by the analytical outputs. It is slightly crammed with three capabilities at once but every clause earns its place.

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?

With no annotations and no output schema, the description must cover both safety profile and return shape; it partially covers the return shape by naming TTL values and flags, which is the main thing an agent needs. The read-only nature, network side effects, and failure behavior for invalid contract IDs or oversized key lists remain unstated.

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 the schema already documents every parameter including the enum and defaults; the description's mention of 'optional extra LedgerKey XDRs' and 'oversized' loosely maps to additional_keys and size_threshold_bytes but adds no syntax or format detail. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource ('Inspect a Soroban contract instance storage') plus the derived outputs (TTL, flags), so an agent knows exactly what the tool produces. It stops short of naming a sibling it is not, which matters here because 'optional extra LedgerKey XDRs' overlaps conceptually with inspect_xdr/decode_xdr.

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 implied by the capabilities: use it when you need TTL remaining, expiry/archive state, or oversized-entry detection for a contract's storage. There is no explicit when-not guidance and no pointer to inspect_xdr or decode_xdr for raw XDR decoding, leaving the caller to infer the boundary.

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