agent_costdiff
The PRICE OF THE UPDATE: two pasted MCP tools/list readings in, the token bill between them out. Same canon, same estimator as /agent/context-tax (ceil of chars/4, published floor, error declared) so the subtraction means something: classes ADDED/REMOVED/CHANGED/SAME by name, per-tool delta in chars and tokens, percentage of the BEFORE-side estimate (None for an added tool — nothing was paid before; -100.00 for a removed one), and a CHANGED tool carries its moved_fields SIGNED per contract field (the r/mcp case: same 27 tools, 8497->22k tokens, the schema detail alone). Global delta is ceil(after_total/4) - ceil(before_total/4), never the sum of per-tool ceilings — both numbers travel and the divergence is stated, not hidden. Window verdict FITS/OVERFLOWS_WINDOW on EACH side with a closed transition name: FITS_TO_OVERFLOWS is the story testdino told about Playwright MCP 0.0.41->0.0.85 (+78%, unannounced). Delta rides EVERY turn (Irolla); dollars only if you pass your own decimal price — sign included, a listing that shrank saves real money. Movers sorted |delta_chars| desc, ties = name ascending (a diff has no shared pasted order — the rule is declared), top 100 detailed, the rest folded. Both sides validated with the sister's refusals: 5000-entry ceiling, duplicate and empty names refused (shadowing). Flags: EMPTY_BEFORE/AFTER/BOTH (empty listings are a state, not an error), DISJOINT_LISTINGS (a replacement, not an update), NO_CHANGES. Never fetches, never launches: pasted listings only. Sisters: mcp-surface says WHAT changed, context-tax says HOW MUCH one listing costs — this one says the price in between. Free under 32 KB, x402 above.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tools_before": "<tools_before>",
"tools_after": "<tools_after>"
},
"name": "agent_costdiff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| turns | No | turns the definitions ride — the delta is billed per turn too, default 1 | |
| window | No | your context window in tokens, default 200000 (the cited scale, verdict on each side) | |
| tools_after | Yes | the newer pasted tools/list reading | |
| tools_before | Yes | the older pasted tools/list reading | |
| input_per_mtok | No | YOUR price per million input tokens, decimal string — an argument, never a stored table |