Skip to main content
Glama

Decode a Solana account

account_decode
Read-only

Any Solana account's data as named fields: an Anchor program's account decoded with the owner's on-chain IDL (the account type found by its discriminator), an SPL Token or Token-2022 mint or token account, an upgradeable program or its program data, a Squads v4 multisig, or a plain wallet. Says plainly when the owner publishes no IDL. Use for 'what's in this account?', 'decode this pool / vault / config', 'what are this market's parameters?'.

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": {
      "address": "<address>"
    },
    "name": "account_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYesThe account's address (base58)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=true), and the description adds real behavior beyond them: IDL is retrieved from the account owner's on-chain publication, the account type is resolved via discriminator, and it explicitly promises to say when no IDL is published. That last point discloses the failure/degradation mode, which annotations cannot convey. It does not describe the output shape of the 'named fields', keeping it just under the top mark.

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?

Opening clause front-loads the core promise, and the account-type list is delivered as a compact enumeration rather than prose. The final sentence of quoted user phrasings is useful but slightly tacked-on, and the IDL caveat is buried mid-sentence rather than given its own short sentence.

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 one-argument read tool, the description covers scope, the set of supported account kinds, and the no-IDL fallback, which is what an agent needs to decide and call correctly. With no output schema present, a brief note on what 'named fields' actually look like (key names, nesting) would close the last gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single required parameter, and its schema description fully specifies the format ('The account's address (base58)'). The description adds no parameter-level detail, which is fine here because the schema leaves nothing ambiguous; per the single-parameter baseline this sits at 4.

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 (decode) and resource (a Solana account) and then enumerates exactly which account families it handles: Anchor/IDL accounts, SPL Token and Token-2022 mints and token accounts, upgradeable programs and program data, Squads v4 multisigs, plain wallets. That enumeration is what separates it from siblings like tx_decode (transactions) or program_inspect (program internals), so an agent can route without opening the 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?

The trailing examples ('what's in this account?', 'decode this pool / vault / config', 'what are this market's parameters?') give concrete selection cues, and the account-type list implies the boundary versus tx_decode. It stops short of explicit exclusions ('do not use for transaction data, use tx_decode') or prerequisites, so it is strong context rather than full when/when-not routing.

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.