wallet_status
Check local wallet address, network connection, and funding status for autonomous coding agents.
Instructions
Check local wallet status — address, network, and funding status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/wallet-status.ts:7-47 (handler)The handleWalletStatus function implements the wallet_status tool logic. It checks if a wallet file exists at the configured path, reads and parses the wallet JSON, and returns a formatted markdown table with wallet address, creation date, and funding status.
export async function handleWalletStatus( _args: Record<string, never>, ): Promise<{ content: Array<{ type: "text"; text: string }>; isError?: boolean }> { const walletPath = getWalletPath(); if (!existsSync(walletPath)) { return { content: [ { type: "text", text: "No wallet found. Use `wallet_create` to create one.", }, ], }; } try { const wallet = JSON.parse(readFileSync(walletPath, "utf-8")); const lines = [ `## Wallet Status`, ``, `| Field | Value |`, `|-------|-------|`, `| address | \`${wallet.address}\` |`, `| created | ${wallet.created || "unknown"} |`, `| funded | ${wallet.funded ? "yes" : "no"} |`, ]; return { content: [{ type: "text", text: lines.join("\n") }] }; } catch { return { content: [ { type: "text", text: `Error: Could not read wallet file at ${walletPath}`, }, ], isError: true, }; } } - src/tools/wallet-status.ts:5-5 (schema)The walletStatusSchema is an empty object {} since this tool takes no input arguments.
export const walletStatusSchema = {}; - src/index.ts:305-310 (registration)The wallet_status tool is registered with the MCP server using server.tool(), providing the tool name 'wallet_status', description, schema, and async handler wrapper.
server.tool( "wallet_status", "Check local wallet status — address, network, and funding status.", walletStatusSchema, async (args) => handleWalletStatus(args), ); - src/index.ts:52-52 (helper)Import statement that brings in walletStatusSchema and handleWalletStatus from the wallet-status.ts module for use in the main server registration.
import { walletStatusSchema, handleWalletStatus } from "./tools/wallet-status.js";