Method
Measured 2026-12-04 at commit 8eaf1ea with OpenAI's tiktoken encodings o200k_base and cl100k_base (js-tiktoken). Other models' tokenizers give different counts. The script scripts/measure-tokens.ts (pnpm tokens) starts the real MCP route handler with an in-memory database, a fixed clock and seeded ids, makes each call below the way a client would, and counts the response. Tool results count the text block the model reads; protocol results (tool list, discovery, events, resources) count their JSON without _meta. Workflow rows add up measured responses. The run uses a test host name, so URLs in it are a few characters shorter than on trustline.app.
The numbers on this page are read from the file the script writes, and a test in the repository re-measures on every run and fails if the code no longer matches them. They change only when the responses change.
Workflows
Tokens for common sequences of calls, one envelope with one signer:
| Workflow | Calls | o200k_base | cl100k_base | Bytes |
|---|---|---|---|---|
| First-call overhead, legacy client: initialize + tools/list | 2 | 852 | 839 | 3,442 |
| First-call overhead, 2026-07-28 client: server/discover + tools/list | 2 | 893 | 880 | 3,576 |
| Send one envelope: the create call the agent writes plus its result | 2 | 107 | 105 | 368 |
| Wait by polling tl_read status 10 times (9 sent, then completed) | 10 | 480 | 470 | 1,383 |
| Wait by events/poll 10 times (sent event, 8 empty, then viewed+signed+completed) | 10 | 775 | 769 | 2,250 |
| Wait by events/poll on envelope.completed 10 times (9 empty, then completed) | 10 | 494 | 492 | 1,417 |
| Discovery on demand: tl_help {} then tl_help {op} | 2 | 538 | 538 | 1,782 |
- First-call overhead is what a client loads once per session: 852 tokens (o200k) for an
initializeclient, 893 for a 2026-07-28 client. The tool list is 589 of that; the instructions are 220. - Sending takes one call. The arguments the agent writes and the result it reads come to 107 tokens together.
- Help on demand: the op index is 375 tokens and one op's arguments 163. Neither is loaded until the agent asks, and a validation error includes the op's arguments, so a wrong first guess does not need a help call at all.
- Waiting: an empty
events/poll(42 tokens) costs about the same as a status check on a one-signer envelope (44). Polling either way costs roughly the same; theenvelope.lifecyclepoll costs more in total because it also reports who viewed and signed. What events add is pacing (nextPollMs), a cursor that never misses or repeats an event, and delivery that does not need the model to ask: push and webhooks reach the client directly, and how much of that reaches the model depends on the client.
Every response
| Response | o200k_base | cl100k_base | Bytes | Counted |
|---|---|---|---|---|
| initialize (legacy handshake, includes instructions) | 263 | 262 | 1,028 | JSON of the result |
| Server instructions alone | 220 | 221 | 883 | the instructions string |
| server/discover (2026-07-28, includes instructions) | 304 | 303 | 1,162 | JSON of the result without _meta |
| tools/list (6 tools) | 589 | 577 | 2,414 | JSON of the result without _meta |
| tl_help {} (every op, one line each) | 375 | 374 | 1,262 | tool result text |
| tl_help {op:"create"} (one op with its args) | 163 | 164 | 520 | tool result text |
| tl_create create arguments (what the agent writes) | 63 | 62 | 237 | JSON of the tools/call arguments |
| tl_create create {send:true} result | 44 | 43 | 131 | tool result text |
| Same result, whole tools/call result object | 134 | 132 | 460 | JSON of the result: text block, resource_link and structuredContent |
| tl_read status (sent, 1 signer) | 44 | 43 | 131 | tool result text |
| tl_read list (1 envelope) | 20 | 20 | 66 | tool result text |
| tl_read account | 31 | 32 | 98 | tool result text |
| resources/read trustline://envelopes/{id} | 174 | 171 | 529 | JSON of the result without _meta |
| events/poll after the send (1 event) | 123 | 121 | 347 | JSON of the result without _meta |
| events/poll, nothing new | 42 | 42 | 121 | JSON of the result without _meta |
| events/poll after signing (viewed, signed, completed) | 316 | 312 | 935 | JSON of the result without _meta |
| events/poll envelope.completed after signing (1 event) | 116 | 114 | 328 | JSON of the result without _meta |
| tl_read status (completed) | 84 | 83 | 204 | tool result text |
| tl_read download (completed: 2 signed URLs) | 114 | 113 | 261 | tool result text |
| tl_read audit | 67 | 67 | 149 | tool result text |
| events/list (7 event types with schemas) | 1,410 | 1,346 | 5,852 | JSON of the result without _meta |
| Error: create without signers (bad_request, carries the op's args) | 133 | 134 | 432 | tool result text |
| Error: a send op on tl_create | 18 | 18 | 62 | tool result text |
| Error: plan_required (account without a plan) | 90 | 92 | 358 | tool result text |
How it stays small
Six tools, schemas on demand
The tool list has one tool per kind of effect (read, create, update, send, delete) plus tl_help. Each takes {op, args}, with the op names as an enum and args as a plain object, so no per-op schema sits in the list. Each op's arguments come from tl_help {"op"} as a short signature instead of JSON Schema:
tl_help {"op":"create"}
create {title, text|pdf(base64)|doc, signers:[{name,email,order?}], fields?, redirect?:https|{url,label?}, approval?, send?} -> envelope. text -> PDF with signature+date per signer.
args: {title:str,text?:str,pdf?:str,doc?:str,message?:str,signers:[{name:str,email:str,order?:int,role?:str}],fields?:[{kind:signature|initials|date|text|checkbox,signer:int,page:int,x:0..1,y:0..1,w:num,h:num,required?:bool,label?:str}],redirect?:str|{url:str,label?:str},approval?:bool,send?:bool,expiresInDays?:int,remindEveryDays?:int}Tool annotations leave out hints that equal the MCP defaults, every op tool shares one output schema ({type: object}), and on 2026-07-28 the tool list is marked cacheable for an hour (ttlMs, cacheScope: public), so a client can skip fetching it again.
Results are ids and statuses
An op returns what the agent needs next and nothing it already knows: no echo of the title or document it just sent, no full envelope. turn: true marks the signer whose turn it is. Lists return three fields per envelope, and downloads return short-lived URLs rather than file bytes.
tl_read {"op":"status","args":{"id":"env_..."}}
{"id":"env_0012","status":"sent","signers":[{"id":"sgn_0009","email":"ada@example.com","order":1,"status":"notified","turn":true}]}tl_read {"op":"list"}
[{"id":"env_0012","status":"sent","title":"Consulting agreement"}]tl_read {"op":"download","args":{"id":"env_..."}}
{"pdf":"https://trustline.app/api/dl/env_0012/signed?t=...kfa6c57.f8e7b5088129c95b7117426dc737555ac9bed79fa5568fd4","cert":"https://trustline.app/api/dl/env_0012/certificate?t=...kfa6c57.d953845230dff4f89ed4f922ae0e9de632e325b9b7b4b285"}Short instructions
The server instructions are 883 bytes. The first 512 characters stand alone (some clients show only those): what the server does, the tools, and that only a person approves or pays. Everything else is linked, not inlined.
Errors that save a round trip
A bad_request carries the op's argument signature, plan_required carries the checkout link to hand to the person, and rate_limited carries the wait. See the errors reference.
Reading the numbers
- o200k_base and cl100k_base are OpenAI tokenizers. Claude, Gemini, Grok and other models use their own, and their counts will differ. Bytes are the same for every client.
- Clients on protocol 2025-06-18 and later receive each op result twice in one response, as a text block and as
structuredContent, plus aresource_link(the create result is 44 tokens as text, 134 as the whole result object). Which of these reach the model depends on the client. - A client also spends tokens on its own framing around tool calls and results. Those are not counted here: they depend on the client, not on Trustline.
- Sizes grow with the envelope: more signers mean longer status results, and longer titles mean longer events.