Skip to main content
Glama

Spl-token Close Account

spl-token_closeAccount
Destructive

Close a token account and reclaim the rent SOL. SAP MCP context: Protocol spl-token; operation class write. Use for SPL token deploy, mint, transfer, burn, freeze, thaw, and authority management. Confirm mint, decimals, authority, recipient, and amount before writes. Use token tools alongside SAP payments and settlement tools only when token operations are part of the agent service lifecycle.

SAP MCP execution guidance: Intent: SAP MCP tool workflow. Pricing: paid read-premium; estimate first, then use sap_payments_call_paid_tool when the runtime cannot replay x402 natively. Routing: hosted accountless write is blocked; do not call this as a paid hosted write and no x402 payment should be charged. Use the local sap_payments bridge or a hosted unsigned builder when user signing is required. Signer boundary: user-controlled local profile or external signer; OOBE hosted MCP remains non-custodial.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesToken account owner
accountYesToken account to close
destinationNoSolana public key (base58)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesMCP content blocks returned to the caller.
isErrorNoTrue when the tool result represents an application-level error.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"Spl-token Close Account input schema. Intent: SAP MCP tool workflow. Pricing: paid read-premium; estimate first, then use sap_payments_call_paid_tool when the runtime cannot replay x402 natively. Routing: hosted accountless write is blocked; do not call this as a paid hosted write and no x402 payment should be charged. Use the local sap_payments bridge or a hosted unsigned builder when user signing is required. Signer boundary: user-controlled local profile or external signer; OOBE hosted MCP remains non-custodial. Use exact field names from this schema; do not guess aliases or include private key material."
  2. First observed

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already indicate destructiveHint=true. The description adds that closing reclaims rent SOL, but it omits critical behavioral details: the token account must have zero token balance before closing, and the owner must sign. Without this, the agent may attempt to close a non-empty account and fail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is excessively long with repetitive boilerplate about SAP MCP context, pricing, and routing that is not specific to this tool. Only the first sentence is directly relevant. The rest adds noise and should be moved to a shared context.

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?

Given this is a destructive write operation with important preconditions (zero balance required), the description does not fully inform the agent. It lacks details about output schema, error conditions, and the critical requirement that the account must be empty. The boilerplate does not compensate.

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%, with basic descriptions for each parameter. The tool description does not add any additional meaning beyond what the schema provides (e.g., no explanation of 'destination' as where rent goes). Baseline score of 3 is appropriate.

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 clearly states the tool's purpose: 'Close a token account and reclaim the rent SOL.' This distinguishes it from sibling tools like spl-token_transfer or spl-token_burn. However, it adds generic SPL token advice that dilutes focus, but the core verb and resource are clear.

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?

The description includes generic statements like 'Use for SPL token deploy, mint, transfer, burn, freeze, thaw, and authority management,' which incorrectly broadens the tool's scope. It does not provide specific guidance on when to use this tool versus alternatives (e.g., when to close vs burn). There is no mention of prerequisites or exclusions.

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.