check_balance
Check USDC balance in minor units for workspace spending verification. Enables monitoring of available funds against policy caps.
Instructions
Check workspace USDC balance (minor units, 1 USDC = 1,000,000).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- openterms_mcp_server.py:247-254 (handler)The implementation of the 'check_balance' tool handler in handle_tool function.
elif name == "check_balance": resp = client.get("/v1/ledger", headers=_headers()) if resp.status_code == 200: data = resp.json() entries = data.get("entries", []) balance = sum(e["amount"] for e in entries) if entries else 0 return f"Balance: {balance:,} USDC minor units (${balance / 1_000_000:.2f} USDC)" return _format_error(resp) - openterms_mcp_server.py:59-62 (schema)The tool definition (schema) for 'check_balance'.
"name": "check_balance", "description": "Check workspace USDC balance (minor units, 1 USDC = 1,000,000).", "inputSchema": {"type": "object", "properties": {}}, },