list_wallets
Retrieve a list of all available wallets on the Base Network MCP Server for managing blockchain operations via natural language commands.
Instructions
List all available wallets
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_wallets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp/tools.ts:133-149 (handler)The main execution logic for the 'list_wallets' tool. Calls getAllWallets() and formats the response with success message and wallet list.
function handleListWallets(): any { try { const wallets = getAllWallets(); return { success: true, message: `Found ${wallets.length} wallet(s)`, wallets: wallets.map(wallet => ({ name: wallet.name, address: wallet.address })) }; } catch (error) { console.error('Error listing wallets:', error); throw error; } } - src/mcp/server.ts:241-247 (schema)Input schema definition for the 'list_wallets' tool (no input parameters required) as part of the MCP ListTools response.
name: 'list_wallets', description: 'List all available wallets', inputSchema: { type: 'object', properties: {}, }, }, - src/mcp/server.ts:309-319 (registration)MCP CallTool request handler registration that invokes the list_wallets handler and returns the result as text content.
case 'list_wallets': { const result = toolHandlers.handleListWallets(); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; - src/blockchain/wallet.ts:81-83 (helper)Helper function that retrieves all wallets from the in-memory walletStore.
export function getAllWallets(): Wallet[] { return Object.values(walletStore); }