clawy_balance
Check remaining USDC credits and wallet address for Clawy MCP Server's pay-per-use AI tools.
Instructions
Check your Clawy x402 credit balance. Shows remaining USDC credits and wallet address.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:47-55 (handler)The handler function for the clawy_balance tool, which fetches balance via a gateway request and formats the response.
async () => { const result = await gatewayRequest("GET", "/v1/balance"); const wallet = getWalletAddress(); const text = typeof result.data === "string" ? result.data : JSON.stringify({ wallet, ...result.data as object }, null, 2); return { content: [{ type: "text" as const, text }] }; }, ); - src/index.ts:43-55 (registration)Registration of the clawy_balance tool using the server.tool method.
server.tool( "clawy_balance", "Check your Clawy x402 credit balance. Shows remaining USDC credits and wallet address.", {}, async () => { const result = await gatewayRequest("GET", "/v1/balance"); const wallet = getWalletAddress(); const text = typeof result.data === "string" ? result.data : JSON.stringify({ wallet, ...result.data as object }, null, 2); return { content: [{ type: "text" as const, text }] }; }, );