Skip to main content
Glama

check-tokens

Analyze SPL Token operations in Rust/Anchor source code to verify authority, mint, freeze, and Token-2022 compatibility before deployment.

Instructions

Analyze SPL Token operations: authority checks, mint validation, freeze authority, token-2022 compatibility.

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": {
      "source_code": "<source_code>"
    },
    "name": "check-tokens"
  }
}

Input Schema

NameRequiredDescriptionDefault
source_codeYesRust/Anchor source code

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden. It never states that the tool is read-only and performs no code modification, nor does it describe what the analysis returns (findings, severities, line references) or whether token-2022 handling requires any special input handling.

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?

A single front-loaded sentence with a colon-delimited scope list; every item narrows the tool's remit and there is no redundant or hedging wording.

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?

The structured fields are minimal (one fully described param, no annotations, no output schema), so the description must carry the context. It adequately defines the analysis domain but leaves an agent unsure what comes back and how it differs from audit-program or risk-score, which are natural follow-on tools.

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?

The single parameter is fully described in the schema as "Rust/Anchor source code" (100% coverage), so the description need not restate it. The description adds no meaning beyond that, such as whether whole files, snippets, or multiple files are accepted, so the schema-coverage baseline of 3 applies.

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?

"Analyze SPL Token operations" pairs a specific verb with a defined resource, and the colon list (authority checks, mint validation, freeze authority, token-2022 compatibility) scopes exactly which token concerns are covered. It implicitly separates itself from sibling checkers like check-accounts or check-cpi by domain, though it never names them explicitly.

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 can infer 'call this when the code involves SPL Token operations,' but there is no explicit when-to-use, when-not-to-use, prerequisite, or pointer to alternatives such as check-accounts or audit-program for overlapping concerns.

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