Skip to main content
Glama

Empty and close the kit

close_kit
Destructive

Sends remaining USDC, BSV, and ETH to user-confirmed Base and BSV addresses, then stops spending until the user manually resumes.

Instructions

Empty this kit into the user's own wallets, then stop it: it spends nothing more until the user runs npx petasats-mcp resume in a terminal. This moves funds and cannot be undone: base_address and bsv_address must be addresses the user gave you and confirmed, never this kit's own addresses. Each call takes at most one step and returns at once; call it again after call_again_after_seconds until state is 'closed'. It refuses while a swap is running, naming the swap, or while spending is already stopped for another reason. It sends USDC first, then BSV, then ETH. Only ETH dust that cannot pay its own gas (and, rarely, a BSV amount too small to send) is left behind. It never deletes, prints or sends the kit's keys file; keys_note explains that once closed. Returns state ('refused', 'in_progress' or 'closed'), sent (every send made in this close-down so far), and either reason with an optional retry_after_seconds, did and next with call_again_after_seconds, or closed_at, final and keys_note.

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": {
      "base_address": "<base_address>",
      "bsv_address": "<bsv_address>"
    },
    "name": "close_kit"
  }
}

Input Schema

NameRequiredDescriptionDefault
bsv_addressYesDestination BSV mainnet address (P2PKH, starting with 1), supplied and confirmed by the user. Not this kit's own address.
base_addressYesDestination Base address in checksummed 0x form (EIP-55), supplied and confirmed by the user. Not this kit's own address.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.23

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, openWorldHint=true, so the safety profile is partly structured. The description still earns credit by adding facts annotations cannot express: the send order (USDC, then BSV, then ETH), the dust left behind, that it is one step per call and returns immediately, that keys are never deleted or printed, and the exact refusal cases. However, it contradicts nothing but does not describe what happens if the caller passes a kit-owned address beyond a prohibition. A higher 4 would clarify this failure mode. Still, substantial added behavioral context.

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?

Dense but front-loaded: the imperative action and its irreversibility come first, then the retry loop, then the refusal cases, then the return shape. Every sentence carries a distinct, load-bearing fact and there is no filler or restatement of the annotations.

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

Completeness4/5

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

With no output schema, the description fully discharges the return-value burden by enumerating state, sent, reason, retry_after_seconds, did, next, call_again_after_seconds, closed_at, final and keys_note. Completeness relative to complexity is high, though it does not state whether the caller must persist the `sent` ledger or how partial failure of one address (as opposed to a swap) is reported.

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 description coverage is 100%, so the schema already defines both addresses and their formats. The description adds a genuine constraint beyond the schema: the addresses must be ones the user supplied and confirmed, and must never be the kit's own addresses. That is operational meaning the schema's per-field notes only partially repeat.

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?

States a specific verb+resource+scope: "Empty this kit into the user's own wallets, then stop it," and immediately names the terminal-level consequence (spending halts until `resume`). This is distinguishable from withdraw_base/withdraw_bsv because it is framed as a combined close-down of the whole kit, not a single-asset withdrawal.

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?

Gives a concrete driving loop ("call it again after call_again_after_seconds until state is 'closed'") and names the blocking conditions under which it refuses, plus the terminal command the user needs to undo the stop. It does not explicitly route to sibling tools (e.g. wait_for_swap when a swap is running, or resume path), so the alternative-selection guidance is implicit rather than spelled out.

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