Sign in
Docs
0%

Accounts and access

Usage and units tools for assistants (MCP)

The 7 tools an assistant can call for Usage and units over MCP: what each one does, the scopes it needs, its arguments and an example call.

What the account used and what it costs: units by day and by category, the price of each kind of call, the limits that apply to your keys over the last hours and days, and each request the account made with its traffic. Read it to explain a bill, to see a limit coming before you reach it, or to find which client sends the most calls. An assistant calls these tools over MCP; the same operations over HTTP are in the Usage and units API. Tools for assistants lists every product, and MCP shows how to connect an assistant.

accounts_get_units

Get units. Units: the account's units this month: the plan, the allowance, what was used by category, operation and key, and what remains (a member, a key for its own account, or the platform's admin for any account).

Scopes: mcp:read, usage:read · reads only

ArgumentTypeWhat it is
account_idstringThe account's id; an alias of org_id. Leave both out for the caller's own account.
org_idstring
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accounts_get_units",
    "arguments": {}
  }
}

accounts_get_unit_series

Get unit series. The account's calls, tokens and units per UTC day over a window (30 days by default, 92 at most), split by who made them, category or operation. The four largest groups are named and the rest summed as "everything else". Who may read it is as for GetUnits.

Scopes: mcp:read, usage:read · reads only

ArgumentTypeWhat it is
account_idstringThe account's id; an alias of org_id. Leave both out for the caller's own account.
bystring"who" (a key, or a person on the sites), "category", "operation", or empty for the account's total.
fromstringYYYY-MM-DD, UTC, inclusive; to is today and from 29 days before it when empty.
org_idstring
tostring
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accounts_get_unit_series",
    "arguments": {
      "by": "who"
    }
  }
}

accounts_get_usage_limits

My usage limits. Your rolling windows for the scarce work (model generations and sandbox runs): each window's limit in force now, what you used, what remains, when room comes back (resets_at) and a reason in plain words, sized to the platform's capacity (load idle, normal or busy; capacity_source says whether that is configured or measured). admits is false while a window is limited. An empty account_id is your own; an owner or admin may pass a member's user_id. Check it before a long run of generations or investigations.

Scopes: mcp:read · reads only

ArgumentTypeWhat it is
account_idstringThe account's id; an alias of org_id. Leave both out for the caller's own account.
org_idstringThe account; empty is the caller's own.
user_idstringA member of the account (their user id); empty is the caller.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accounts_get_usage_limits",
    "arguments": {
      "user_id": "01JD8Z3QK4W5X6Y7Z8A9B0C1D2"
    }
  }
}

accounts_get_traffic

An account's traffic. An account's calls to InOrbit over a window (window: 5m, 15m, 1h, 6h or 24h; until: RFC 3339, default now; rpc_prefix narrows to one service, such as iohr.billing.): about 30 buckets of calls, failures and p50/p95, the totals with error rate and calls a minute, the 10 operations failing most with their top code, and the last 20 failed calls (operation, code, time, request id). Never a key, a person or a body. Percentiles are approximate (t-digest). org_id is the account (accounts_get_me names yours).

Scopes: mcp:read, usage:read · reads only

ArgumentTypeWhat it is
account_idstringThe account's id; an alias of org_id. Leave both out for the caller's own account.
org_idstring
rpc_prefixstringOnly operations whose full name starts with this, such as "iohr.billing."; at most 128 characters; empty for all.
untilstringRFC 3339: the window ends here; empty is now. Within the log's 30 days.
windowstring5m, 15m, 1h, 6h or 24h; empty is 15m.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accounts_get_traffic",
    "arguments": {
      "rpc_prefix": "iohr.billing."
    }
  }
}

accounts_get_usage

Get usage. What the account used, by day, service and metric (a member, or a key for its own account).

Scopes: mcp:read, usage:read · reads only

ArgumentTypeWhat it is
account_idstringThe account's id; an alias of org_id. Leave both out for the caller's own account.
fromstringYYYY-MM-DD, inclusive; the last 30 days when empty.
org_idstring
tostring
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accounts_get_usage",
    "arguments": {
      "from": "2026-11-06T00:00:00Z"
    }
  }
}

accounts_list_unit_categories

List unit categories. The categories and what one call in each costs.

Scopes: mcp:read, usage:read · reads only

ArgumentTypeWhat it is
page_sizeintegerAt most 200 (larger is coerced down); 0 means 50.
page_tokenstringFrom the previous answer's next_page_token; "" for the first page.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accounts_list_unit_categories",
    "arguments": {
      "page_size": 20
    }
  }
}

accounts_get_spending_limit

Spending limit. An account's overage and monthly spending limit: whether overage runs, the limit and its currency, what it buys in units and the units past the allowance this month. Read only: an owner or admin changes the limit in the console. org_id is the account (accounts_get_me names yours).

Scopes: mcp:read, usage:read · reads only

ArgumentTypeWhat it is
account_idstringThe account's id; an alias of org_id. Leave both out for the caller's own account.
org_idstringThe account; "" is the caller's own.
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accounts_get_spending_limit",
    "arguments": {}
  }
}