Skip to main content
Glama

check-accounts

Validate Solana/Anchor account constraints such as ownership, signer authority, token accounts, and duplicate mutable accounts to catch missing security checks in Rust source code.

Instructions

Check account validation: owner checks, signer verification, authority, token accounts, duplicate mutable accounts.

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-accounts"
  }
}

Input Schema

NameRequiredDescriptionDefault
source_codeYesRust/Anchor source code

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/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 lists what is inspected, which is useful, but says nothing about how findings are produced or surfaced (severity, output shape, false positives), whether the code must be complete/compilable, or whether the tool only reads the input.

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?

One front-loaded sentence with no filler, and the enumerated check families are the most useful part. It is arguably over-compressed, but every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a static-analysis tool with no output schema and no annotations, the definition should explain what the agent gets back and how to interpret it. As written, an agent knows roughly what is checked but not what a call produces or how findings differ from a risk-score or explain-finding follow-up.

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?

There is a single required parameter and schema description coverage is 100%, with the schema stating 'Rust/Anchor source code'. The description adds no constraints, size limits, or expected code scope (whole program vs. single instruction handler), so baseline 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?

The description names a specific verb ('Check') and resource ('account validation') and enumerates the concrete check families performed: owner checks, signer verification, authority, token accounts, duplicate mutable accounts. This enumeration makes it distinguishable from siblings such as check-cpi or check-arithmetic, though it never explicitly says it analyzes Rust/Anchor source code (that fact lives only in 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to reach for this tool versus check-tokens, check-pda, or check-arithmetic, no prerequisites, and no statement of expected inputs beyond the schema. The enumeration implies the domain but leaves routing decisions entirely to inference.

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