Skip to main content
Glama
jstibal

Openterms-mcp

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)
  • 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": {}},
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jstibal/openterms-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server