Skip to main content
Glama

check-pda

Audit Solana/Anchor Program Derived Address usage in Rust source code to detect seed confusion, bump storage issues, and address collisions.

Instructions

Audit PDA (Program Derived Address) usage: seed confusion, bump storage, collisions.

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

Input Schema

NameRequiredDescriptionDefault
source_codeYesRust/Anchor source code

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does add real behavioral value by enumerating what the audit looks for (seed confusion, bump storage, collisions), but it never confirms the operation is read-only, states whether findings are ranked by severity, or hints at the response shape.

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?

One compact sentence with the acronym expanded and the three check categories front-loaded. Nothing is wasted and no sentence repeats the tool name.

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?

For a single-input audit tool with no output schema, the definition should at least describe what comes back (findings, severity, locations). It covers what is checked but not the result, leaving a meaningful gap given the absence of annotations and an output schema.

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 coverage is 100% and the single parameter is documented as 'Rust/Anchor source code', so the schema already does the work. The description adds only a weak contextual hint that the code should involve PDA usage; no format or scope constraints are given beyond the schema.

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?

Specific verb+resource ('Audit PDA usage') with three concrete check categories: seed confusion, bump storage, collisions. The PDA focus distinguishes it from siblings like check-accounts or check-arithmetic, though it never names an alternative 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 it should call this on Rust/Anchor code that constructs or uses PDAs. There is no explicit when-to-use condition, no exclusions, and no routing to or away from sibling checks such as check-accounts.

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