get_card_balance
Retrieve current balance, currency, and status for a virtual card to monitor spending and manage online payments.
Instructions
Get the current balance and status of a virtual card. Only cards created by this agent (same client_id) are accessible. Returns available_balance, card_currency, status, and updated_at.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| card_id | Yes | Card ID, e.g. 'c_123' |
Implementation Reference
- src/tools/cards.ts:155-171 (handler)The handler implementation for the get_card_balance MCP tool. It calls the payment API to retrieve the balance for a specific card_id.
server.tool( "get_card_balance", [ "Get the current balance and status of a virtual card.", "Only cards created by this agent (same client_id) are accessible.", "Returns available_balance, card_currency, status, and updated_at.", ].join(" "), { card_id: z.string().describe("Card ID, e.g. 'c_123'") }, async ({ card_id }) => { try { const result = await client.get<unknown>(`/payment/cards/${card_id}/balance`); return toolOk(result); } catch (err) { return toolError(err); } }, );