Skip to main content
Glama
jstibal

Openterms-mcp

check_balance

Check the USDC balance of your workspace in minor units. Verify available funds before executing agreements or consent receipts.

Instructions

Check workspace USDC balance (minor units, 1 USDC = 1,000,000).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The check_balance handler function. Makes a GET request to /v1/ledger, sums the 'amount' field from all ledger entries, and returns the formatted balance in USDC minor units.
    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 schema/definition for the check_balance tool. It takes no input arguments (empty properties) and returns the USDC balance in minor units.
    {
        "name": "check_balance",
        "description": "Check workspace USDC balance (minor units, 1 USDC = 1,000,000).",
        "inputSchema": {"type": "object", "properties": {}},
    },
  • CLI registration: maps the 'balance' CLI command to handle_tool('check_balance', {}).
    elif cmd == "balance":
        print(handle_tool("check_balance", {}))
  • MCP server registration: all tools including check_balance are listed from the TOOLS array via the list_tools handler.
    @server.list_tools()
    async def list_tools():
        return [types.Tool(**t) for t in TOOLS]
  • Module docstring listing check_balance as an MVP1 tool.
    MVP1: issue_receipt, verify_receipt, check_balance, get_pricing, list_receipts
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full burden. It discloses that the balance is in minor units but omits other behavioral traits such as authentication requirements, read-only nature, or scope (e.g., which workspace).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, well-structured sentence that conveys the tool's purpose and key detail (unit) without extraneous words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with no parameters or output schema, the description is mostly adequate but leaves ambiguity about which workspace is being checked (e.g., does it use the current workspace context?). This gap could confuse an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters (input schema is empty), so the description correctly provides no parameter details. However, it adds important context about the unit of the returned balance, which is valuable beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('check') and the resource ('workspace USDC balance'), and specifies the unit (minor units with conversion factor). It distinguishes the tool from siblings as the only balance-checking tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. It does not mention any prerequisites, context, or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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