Skip to main content
Glama

Solana instruction discriminator lookup (free)

lookup_solana_instruction
Read-only

Look up a Solana program instruction from instruction data, an Anchor discriminator, a native instruction tag, or an instruction name. Returns matching programs, account lists, argument types and page URLs from a bundled IDL snapshot. No RPC. Programs can upgrade; computed Anchor discriminators are labelled as computed. Free, no payment needed. Use when you have instruction data or a discriminator and need to know which instruction it is.

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": {
      "data": "<data>"
    },
    "name": "lookup_solana_instruction"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesInstruction data (hex or base58), a discriminator (e.g. 0xe517cb977ae3ad2a), or an instruction name (e.g. route or SetComputeUnitLimit).
program_idNoOptional program ID, slug or name to narrow matches (e.g. jupiter-v6 or JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description corroborates this with "No RPC" and a bundled IDL snapshot as the data source. It goes further by warning that programs can upgrade and that computed Anchor discriminators are labelled as computed, plus confirming the call is free — useful behavioral caveats beyond the structured fields.

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 action and input forms, then returns, then cost/usage. It is efficient overall, though the enumerated return list and the standalone "No RPC" plus "Free, no payment needed" sentences are slightly staccato and could be tightened.

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?

With no output schema, the description still tells the agent what comes back (matching programs, account lists, argument types, page URLs) and flags the IDL staleness caveat. For a two-parameter read-only lookup, nothing needed to invoke or interpret it is missing.

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 both `data` and `program_id` are already documented with formats and examples. The description restates the accepted input forms and the narrowing role of program_id but adds no syntax or edge-case detail beyond the schema, making the baseline 3 correct.

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?

Names a specific verb and resource ("look up a Solana program instruction") and enumerates the four input forms it accepts (instruction data, Anchor discriminator, native tag, instruction name). It also states the return payload, so an agent can distinguish it from siblings like decode_solana_error or explain_tx 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 closing sentence gives an explicit trigger: "Use when you have instruction data or a discriminator and need to know which instruction it is." That is a clear when-to-use condition, though it names no exclusion or alternative tool for overlapping cases such as full transaction explanation.

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.

Resources