Skip to main content
Glama

Find Solana program activity

portal_solana_query_instructions
Read-only

Query Solana program and account instructions with filters for program IDs, discriminators, and time ranges to inspect Token Program, Jupiter, and Anchor activity.

Instructions

Query raw Solana instructions with program and account filters.

COMMON USER ASKS:

  • Token Program instructions

WHEN TO USE:

  • You need program-level or account-level instruction activity.

  • You want to inspect Token Program, Jupiter, System Program, or Anchor discriminator activity.

DON'T USE:

  • You only need transaction-level activity and not individual instructions.

EXAMPLES:

  • Token Program instructions: {"network":"solana-mainnet","timeframe":"1h","program_id":["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],"limit":20}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
a0NoAccount at index 0. You can pass a single string or an array.
a1NoAccount at index 1. You can pass a single string or an array.
a2NoAccount at index 2. You can pass a single string or an array.
a3NoAccount at index 3. You can pass a single string or an array.
a4NoAccount at index 4. You can pass a single string or an array.
a5NoAccount at index 5. You can pass a single string or an array.
a6NoAccount at index 6. You can pass a single string or an array.
a7NoAccount at index 7. You can pass a single string or an array.
a8NoAccount at index 8. You can pass a single string or an array.
a9NoAccount at index 9. You can pass a single string or an array.
d1No1-byte discriminator filter (0x-prefixed hex). You can pass a single string or an array.
d2No2-byte discriminator filter (0x-prefixed hex). You can pass a single string or an array.
d4No4-byte discriminator filter (0x-prefixed hex). You can pass a single string or an array.
d8No8-byte discriminator filter - Anchor (0x-prefixed hex). You can pass a single string or an array.
a10NoAccount at index 10. You can pass a single string or an array.
a11NoAccount at index 11. You can pass a single string or an array.
a12NoAccount at index 12. You can pass a single string or an array.
a13NoAccount at index 13. You can pass a single string or an array.
a14NoAccount at index 14. You can pass a single string or an array.
a15NoAccount at index 15. You can pass a single string or an array.
limitNoMax instructions
cursorNoContinuation cursor from a previous response
networkNoNetwork name or alias. Optional when continuing with cursor.
to_blockNoEnding slot number. Keep ranges reasonable for performance.
timeframeNoTime range (e.g., '1h', '24h'). Alternative to from_block/to_block. Solana slots are ~400ms.
from_blockNoStarting slot number (use this OR timeframe)
program_idNoProgram IDs. You can pass a single string or an array.
include_logsNoInclude program logs
is_committedNoOnly committed transactions
to_timestampNoEnding timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "now".
finalized_onlyNoOnly query finalized slots
from_timestampNoStarting timestamp. Accepts Unix seconds, Unix milliseconds, ISO datetime, or relative input like "1h ago".
mentions_accountNoAccounts mentioned anywhere in the instruction. You can pass a single string or an array.
include_transactionNoInclude transaction data
transaction_fee_payerNoFee payer filter. You can pass a single string or an array.
include_inner_instructionsNoInclude inner (CPI) instructions
include_transaction_balancesNoInclude SOL balance changes
include_transaction_instructionsNoInclude all instructions from the parent transaction (sibling instructions)
include_transaction_token_balancesNoInclude token balance changes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_uiNoOptional chart, table, and follow-up presentation metadata.
_llmNoHints that help an AI client locate the primary evidence.
_metaNoNetwork, block range, timing, and row-count metadata.
errorNoStructured failure details when the tool cannot complete the request.
itemsNoPrimary result rows when the tool returns a list.
valueNoPrimary result when the tool returns a scalar value.
answerNoConcise answer grounded in the returned blockchain data.
_noticeNoImportant limitation or truncation notice.
displayNoPlain-language labels for presenting the result.
_noticesNoImportant limitations or truncation notices.
_summaryNoHuman-readable summary of the result.
_coverageNoCompleteness of the requested window and result set.
_evidenceNoReplayable arguments, exact-data digest, row count, and completeness receipt.
_orderingNoOrdering guarantees for the returned data.
_executionNoBounded execution and scan details.
_freshnessNoFreshness and finality information for the returned data.
next_stepsNoSafe follow-up actions and continuation guidance.
_paginationNoPagination state and an optional continuation cursor.
investigationNoEvidence paths, useful pivots, and result limitations.
pipes_handoffNoOptional SQD Pipes guidance for custom data needs.
_tool_contractNoTool identity, intent, and supported blockchain families.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.8.3
    • addedOutput schema / properties / _evidence
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Replayable arguments, exact-data digest, row count, and completeness receipt.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed7 schema fields changedv0.8.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / from_timestamp / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / from_timestamp / type
      Removed value: -[
      -  "number",
      -  "string"
      -]
    • addedInput schema / properties / to_timestamp / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / to_timestamp / type
      Removed value: -[
      -  "number",
      -  "string"
      -]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "_coverage": {
      +      "description": "Completeness of the requested window and result set."
      +    },
      +    "_execution": {
      +      "additionalProperties": {},
      +      "description": "Bounded execution and scan details.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "_freshness": {
      +      "description": "Freshness and finality information for the returned data."
      +    },
      +    "_llm": {
      +      "description": "Hints that help an AI client locate the primary evidence."
      +    },
      +    "_meta": {
      +      "additionalProperties": {},
      +      "description": "Network, block range, timing, and row-count metadata.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "_notice": {
      +      "description": "Important limitation or truncation notice.",
      +      "type": "string"
      +    },
      +    "_notices": {
      +      "description": "Important limitations or truncation notices.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "_ordering": {
      +      "description": "Ordering guarantees for the returned data."
      +    },
      +    "_pagination": {
      +      "additionalProperties": {},
      +      "description": "Pagination state and an optional continuation cursor.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "_summary": {
      +      "description": "Human-readable summary of the result.",
      +      "type": "string"
      +    },
      +    "_tool_contract": {
      +      "additionalProperties": {},
      +      "description": "Tool identity, intent, and supported blockchain families.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "_ui": {
      +      "description": "Optional chart, table, and follow-up presentation metadata."
      +    },
      +    "answer": {
      +      "description": "Concise answer grounded in the returned blockchain data.",
      +      "type": "string"
      +    },
      +    "display": {
      +      "additionalProperties": {},
      +      "description": "Plain-language labels for presenting the result.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "error": {
      +      "additionalProperties": {},
      +      "description": "Structured failure details when the tool cannot complete the request.",
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "origin": {
      +          "type": "string"
      +        },
      +        "retry_after_ms": {
      +          "type": "number"
      +        },
      +        "retryable": {
      +          "type": "boolean"
      +        },
      +        "suggestions": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "summary": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "origin",
      +        "summary",
      +        "retryable",
      +        "suggestions"
      +      ],
      +      "type": "object"
      +    },
      +    "investigation": {
      +      "additionalProperties": {},
      +      "description": "Evidence paths, useful pivots, and result limitations.",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "items": {
      +      "description": "Primary result rows when the tool returns a list.",
      +      "items": {},
      +      "type": "array"
      +    },
      +    "next_steps": {
      +      "additionalProperties": {},
      +      "description": "Safe follow-up actions and continuation guidance.",
      +      "properties": {
      +        "actions": {
      +          "items": {
      +            "additionalProperties": {},
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "continuation": {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "custom_data": {
      +          "additionalProperties": {},
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "actions"
      +      ],
      +      "type": "object"
      +    },
      +    "pipes_handoff": {
      +      "description": "Optional SQD Pipes guidance for custom data needs."
      +    },
      +    "value": {
      +      "description": "Primary result when the tool returns a scalar value."
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observedv0.7.9

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true and destructiveHint=false, and the description is consistent with that. It adds useful context that results are raw instructions and can include Anchor discriminators, but it does not disclose pagination behavior or caveats about finality/performance beyond what the schema fields already note.

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?

The description is well-structured with COMMON USER ASKS, WHEN TO USE, DON'T USE, and EXAMPLES sections. It is front-loaded with the core query statement and every section adds selection or invocation guidance.

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?

Given the 39-parameter schema with complete per-parameter descriptions, the presence of an output schema, and safety annotations, the description supplies enough orientation. It could be stronger with an explicit pointer to the transaction-level sibling and an account-filter example, but it is not lacking critical usage context.

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?

Schema description coverage is 100%, so the schema carries most parameter documentation. The description adds value with a concrete Token Program example that demonstrates the expected formats for network, timeframe, program_id (as an array), and limit, and it points users at relevant high-value filters such as program_id and discriminator parameters.

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?

The opening sentence names a specific action and resource: 'Query raw Solana instructions' with program/account filters, and the WHEN/DON'T USE sections make it clear this is instruction-level activity as opposed to transaction-level activity. This distinguishes it cleanly from the sibling portal_solana_query_transactions.

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 WHEN TO USE and DON'T USE sections give explicit conditions (program-level/account-level instruction activity vs. transaction-level activity) and a concrete example. It stops short of naming the sibling query tool explicitly, so the routing guidance is clear but not fully explicit.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/subsquid-labs/portal-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server