How Tokens Work
GTM Tools meters every paid tool in tokens. The unit decouples price from raw infrastructure cost — billing happens in dollars, but a tool may run multiple SMTP probes or LinkedIn scrapes per call, so a flat token price keeps the agent’s reasoning simple.
The basics
The lifecycle of a paid call
When your agent calls a paid tool:
- Authorize. The auth layer resolves the bearer token to an org.
- Look up cost. The cost for that tool is fetched.
- Reserve. The cost is debited from the wallet immediately. Concurrent calls see the reduced balance.
- Execute. The tool runs. This is where most of the time is spent.
- Settle.
- On success: the reservation is committed.
- On failure (
5xxupstream): the reservation is refunded. - On client-side failure (
400,401,402,404,429): no charge applied (the reservation never happened in those cases).
What “0 tokens” means
Some tools cost 0 — every Admin tool, plus a handful elsewhere:
These are intentional — they let your agent orient itself without spending tokens.
Refunds
Token reservations are refunded when:
- An upstream provider (LinkedIn proxy, email verifier, web-tools) returns a
5xx. - The tool times out.
- A request fails mid-execution after the reservation but before settlement.
You’ll see refunds reflected in get_token_balance immediately. They’re not surfaced in list_invoices (which shows charge/refund activity).
When you run out
The next paid tool call returns 402 Insufficient Tokens with no work done. Two options:
- One-off top-up. Call
buy_tokens({"amount_usd": 25}for 2,500 tokens). - Auto-reload. Call
set_auto_reloadonce with a threshold and a top-up amount; the saved card is charged automatically when the balance drops.