Skip to main content
Glama

ChainGuard Web3 Security & DeFi MCP

reclaim_solana_rent

Read-onlyIdempotent

Scan a Solana wallet via live mainnet RPC for empty 0-balance SPL and Token-2022 token accounts (~0.002039 SOL trapped rent per account) and optionally construct an unsigned base64 CloseAccount batch transaction. Read-only and non-custodial: never broadcasts or signs transactions (unlimited free calls; user receives +88% net reclaimed SOL when they sign and broadcast, with a 12% atomic recovery fee). Returns JSON with wallet, empty_closable_accounts, reclaimable_sol, estimated_net_user_sol, and unsigned_tx_base64 (up to 15 accounts per atomic tx).

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": {
      "wallet": "<wallet>"
    },
    "name": "reclaim_solana_rent"
  }
}

Input Schema

NameRequiredDescriptionDefault
walletYesBase58-encoded Solana wallet public key (32-44 chars) to scan for empty 0-balance SPL and Token-2022 token accounts.
build_txNoWhen `true` (default) and closable empty accounts exist, fetches a recent mainnet blockhash and includes `unsigned_tx_base64` ready for wallet signing.

Output Schema

NameRequiredDescriptionDefault
walletYes
reclaimable_solYes
empty_closable_accountsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / build_tx / description
      Added value: +"When `true` (default) and closable empty accounts exist, fetches a recent mainnet blockhash and includes `unsigned_tx_base64` ready for wallet signing."
    • addedInput schema / properties / wallet / description
      Added value: +"Base58-encoded Solana wallet public key (32-44 chars) to scan for empty 0-balance SPL and Token-2022 token accounts."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "empty_closable_accounts": {
      +      "type": "integer"
      +    },
      +    "reclaimable_sol": {
      +      "type": "number"
      +    },
      +    "wallet": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "wallet",
      +    "empty_closable_accounts",
      +    "reclaimable_sol"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint, openWorldHint, and idempotentHint annotations, it discloses that it never broadcasts or signs, that calls are unlimited/free, the 12% atomic recovery fee and +88% net user outcome, and the 15-account batch cap. That is substantive safety and operational context.

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?

The definition is front-loaded and information-dense, with no filler. It is a long single paragraph and repeats fee/return details already partly covered by the output schema, so it is slightly overstuffed for conciseness.

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 a 100%-covered input schema, an output schema, and rich annotations, the description supplies the purpose, safety posture, fee model, batch limit, and return fields needed to call it correctly.

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 coverage is 100%, so the baseline is 3; the description still adds that transaction construction is optional and that the resulting unsigned transaction handles 'up to 15 accounts per atomic tx,' a batch constraint not present in the schema. It does not add wallet syntax beyond the schema.

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 description opens with a specific verb and resource: 'Scan a Solana wallet via live mainnet RPC for empty 0-balance SPL and Token-2022 token accounts,' then adds that it can 'optionally construct an unsigned base64 CloseAccount batch transaction.' This clearly identifies the rent-reclaim use case and distinguishes it from generic token or wallet checks.

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?

It makes the use case clear: reclaim trapped rent from empty token accounts, with read-only/non-custodial operation before the user signs. It does not name when not to use it or point to an alternative tool, so it falls short of explicit alternative guidance.

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.