Skip to main content
Glama

No proxy, no API key, nothing leaves your machine. Run it as a CLI, open the same report in your browser with tallybook --serve, or add tallybook-mcp to Claude Code or Codex and ask the agent itself what it's spending and what would be cheaper.

More in the documentation.

Install

brew install --cask magna-nz/tap/tallybook

Also available via go install github.com/magna-nz/tallybook/cmd/tallybook@latest, or as a release download. Works on macOS, Linux and Windows.

Add the MCP server so your agent can check its own spend mid-session — tallybook-mcp ships alongside tallybook, so no separate install:

claude mcp add tallybook -- tallybook-mcp   # Claude Code

For Codex, add it to ~/.codex/config.toml:

[mcp_servers.tallybook]
command = "tallybook-mcp"

Related MCP server: token-meter

Use

tallybook                         # this period's report: the five biggest findings
tallybook --serve                 # the same report, findings and sessions in your browser, on localhost
tallybook findings                # every finding, grouped by what kind of change it asks for
tallybook --since 7d --compare    # this week against last week: spend, sessions, cache hit rate
tallybook finding 1               # finding #1 in full: what happened, why, what to change
tallybook finding 1 --evidence    # the same, with the sessions behind it
tallybook finding 1 --patch       # finding #1's fix, as an applyable diff
tallybook agents                  # spend by sub-agent type, with the model and effort each ran at
tallybook sessions --sort cost    # sessions ranked by what they cost
tallybook changes                 # did a past model swap actually save money?
tallybook setup hook              # record sessions automatically as they end

Docs

The command reference, the MCP server's tools, configuration, and the privacy model live on the documentation site.

License

MIT

Available Tools

8 tools
agentsB
Read-onlyIdempotent

Spend per sub-agent type: runs, the model it mostly used, average cost per run, the share of runs whose tool calls were all read-only, errored tool results, and runs where the requested model differed from the one actually used.

ParametersJSON Schema
NameRequiredDescriptionDefault
sinceNowindow: 7d, 30d, 90d, all, or a YYYY-MM-DD start date; default 30d
sourceNorestrict to one tool: "claude-code" or "codex"; default both
projectNorestrict to one project directory, exact match, or a prefix if it ends with a path separator
currencyNooverride the detected plan: "usd" reports as charged, "share" reports as a subscription's list-price equivalent

Output Schema

ParametersJSON Schema
NameRequiredDescription
planYes"api" or "subscription", re-detected on every scan
agentsYes
currencyYes"usd" when the figures were charged, "list_price_equivalent" when a subscription covered them and the figures are what the usage would have cost on the API
scan_errorNowhy the most recent scan attempt failed, in which case the figures are from the last successful scan
age_secondsYesseconds since that scan; the server rescans when a tool is called more than 60 seconds after the last attempt, or on refresh
ingested_atYesRFC 3339 time of the last successful transcript scan; empty if none has succeeded yet
plan_reasonYeswhy that plan was chosen

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, covering the safety profile. The description adds useful context about the metrics returned, but does not discuss authentication, rate limits, or other operational behavior beyond what annotations provide.

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

Conciseness4/5

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

The description is a single sentence that front-loads the core subject ('Spend per sub-agent type') and lists metrics efficiently. It is slightly long but every clause contributes useful information.

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?

The tool has an output schema and annotations, and all parameters are documented in the schema. The description summarizes return values but omits usage context and sibling differentiation, which are gaps for an agent selecting among the many reporting tools.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents all four parameters. The description adds no additional parameter meaning, which is appropriate given the schema's completeness.

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

Purpose4/5

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

The description names a specific resource (sub-agent type) and enumerates the metrics reported (runs, model, average cost, read-only share, errors, model mismatch). The purpose is clear, but it lacks an explicit verb and does not distinguish itself from sibling tools like report or prices.

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?

There is no guidance on when to use this tool versus alternatives, no mention of prerequisites, and no exclusions. The description only lists output metrics, leaving the agent to infer context.

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

changesB
Read-onlyIdempotent

Every point where a sub-agent's model changed, with the real runs before and after compared and a verdict: keep, watch, revert, or too early. These are measured figures, not estimates.

ParametersJSON Schema
NameRequiredDescriptionDefault
sinceNowindow: 7d, 30d, 90d, all, or a YYYY-MM-DD start date; default 30d
sourceNorestrict to one tool: "claude-code" or "codex"; default both
projectNorestrict to one project directory, exact match, or a prefix if it ends with a path separator
currencyNooverride the detected plan: "usd" reports as charged, "share" reports as a subscription's list-price equivalent
min_runsNoruns required on each side of a change before judging it, at least 1; default 3
include_undecidedNoalso return changes with too few runs on one side to judge; default false

Output Schema

ParametersJSON Schema
NameRequiredDescription
planYes"api" or "subscription", re-detected on every scan
changesYes
currencyYes"usd" when the figures were charged, "list_price_equivalent" when a subscription covered them and the figures are what the usage would have cost on the API
min_runsYes
undecidedYeschanges with too few runs to judge, whether or not they are included
scan_errorNowhy the most recent scan attempt failed, in which case the figures are from the last successful scan
age_secondsYesseconds since that scan; the server rescans when a tool is called more than 60 seconds after the last attempt, or on refresh
ingested_atYesRFC 3339 time of the last successful transcript scan; empty if none has succeeded yet
plan_reasonYeswhy that plan was chosen

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and a closed-world profile, so safety is covered structurally. The description adds useful behavioral context by defining the verdict vocabulary and asserting the figures are measured rather than estimated, but it says nothing about pagination, ordering, or how the comparison is scoped.

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?

Two sentences, no filler, and the core purpose is front-loaded before the qualifier about measured figures. Every clause carries information.

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

Completeness4/5

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

With a full input schema, an output schema, and annotations, the description does not need to describe returns or safety. It covers the tool's purpose and output semantics adequately, though a note on how verdicts are computed or when the tool is the right entry point would close the remaining gap.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all six parameters (since windows, source, project matching, currency, min_runs, include_undecided). The description adds no parameter-level meaning beyond that, which puts it at the baseline of 3.

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

Purpose4/5

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

The description names a specific resource (points where a sub-agent's model changed) and a concrete output (before/after runs compared with a keep/watch/revert/too early verdict), which is clearly distinct from siblings like agents, prices, or report. It stops short of explicitly contrasting itself with those siblings, so it is not a 5.

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?

There is no guidance on when to reach for this tool versus agents, report, or session, and no mention of prerequisites or conditions. The closing line about measured figures implies a data-quality context but gives no when/when-not framing.

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

findingA
Read-onlyIdempotent

One finding in full, addressed by its stable id from report: what happened, why it costs, what to change, what to expect, plus the evidence table and the patch if there is a file to change.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesthe finding's id from report, such as readonly-agent-on-strong-model
sinceNowindow: 7d, 30d, 90d, all, or a YYYY-MM-DD start date; default 30d
sourceNorestrict to one tool: "claude-code" or "codex"; default both
projectNorestrict to one project directory, exact match, or a prefix if it ends with a path separator
currencyNooverride the detected plan: "usd" reports as charged, "share" reports as a subscription's list-price equivalent

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
planYes"api" or "subscription", re-detected on every scan
patchNounified diff of the file change, when there is a file to change; tallybook never applies it
shareYes
titleYes
currencyYes"usd" when the figures were charged, "list_price_equivalent" when a subscription covered them and the figures are what the usage would have cost on the API
evidenceYes
directionYes
confidenceYes
saving_usdYesestimated saving per 30 days at list price; 0 for info findings
scan_errorNowhy the most recent scan attempt failed, in which case the figures are from the last successful scan
age_secondsYesseconds since that scan; the server rescans when a tool is called more than 60 seconds after the last attempt, or on refresh
ingested_atYesRFC 3339 time of the last successful transcript scan; empty if none has succeeded yet
plan_reasonYeswhy that plan was chosen
why_it_costsYes
what_happenedYes
what_to_changeYes
what_to_expectYes

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so the safety profile is covered. The description adds genuine context beyond that: it discloses the shape of the returned artifact and that a patch is only present conditionally ('if there is a file to change'), which is useful behavioral nuance.

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

Conciseness4/5

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

A single sentence that front-loads the resource and the addressing key, then lists the payload contents. It is dense but every clause earns its place; no filler or repetition.

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

Completeness4/5

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

With an output schema present and 100% parameter coverage, the description need not explain return values in depth, yet it still summarizes the payload. Annotations carry the safety profile. The only gap is the absence of explicit routing guidance versus the report tool, which is minor.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents id, since, source, project, and currency in detail. The description only reiterates that the id is stable and comes from report, adding minimal meaning beyond the schema. Baseline 3 applies.

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

Purpose4/5

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

The description names a specific resource ('One finding in full') and the addressing key ('its stable id from report'), and enumerates what the finding contains (what happened, why it costs, what to change, what to expect, evidence table, patch). It is clearly distinguishable from siblings like report or sessions. It lacks an explicit verb, but the purpose is unambiguous.

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

Usage Guidelines3/5

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

Usage is implied through 'its stable id from report', which tells the agent the id originates from the report tool and therefore establishes a retrieval flow. However, it never states when to prefer this over the report tool or other siblings, nor any exclusions. Adequate but incomplete guidance.

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

pricesA
Read-onlyIdempotent

The price table every figure is computed from, in US dollars per million tokens, with the date it was last verified. Includes any overrides from the user's config.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
unitYesalways usd_per_million_tokens
modelsYes
verifiedYesthe date the built-in table was last checked against the vendors' price pages
scan_errorNowhy the most recent scan attempt failed, in which case the figures are from the last successful scan
age_secondsYesseconds since that scan; the server rescans when a tool is called more than 60 seconds after the last attempt, or on refresh
ingested_atYesRFC 3339 time of the last successful transcript scan; empty if none has succeeded yet

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and closed-world behavior, so the safety profile is covered. The description adds genuinely useful non-annotation context: the unit of measure (USD per million tokens), that a verification date is included, and that user config overrides are folded in.

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 sentence that front-loads the resource and then layers unit, freshness, and override information with no filler. Every clause earns its place.

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

Completeness5/5

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

For a zero-argument read tool with an output schema and full annotation coverage, the description supplies everything needed: what the data is, its units, its provenance, and its freshness. Return-value details are correctly left to the output schema.

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

Parameters4/5

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

The tool takes zero parameters, so there is nothing for the description to disambiguate; baseline 4 applies. No misleading or missing parameter guidance exists because no inputs are accepted.

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

Purpose4/5

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

The description names a specific resource (the token price table) and states exactly what it contains: USD per million tokens, a last-verified date, and user config overrides. It is clear what an agent gets back, though it does not explicitly distinguish itself from the loosely-related sibling 'refresh' or other catalog tools.

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?

There is no explicit when-to-use guidance, no prerequisites, and no alternatives named. The phrase 'every figure is computed from' implies the table underlies cost calculations, but the agent must infer that it should call this tool to audit or verify pricing.

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

refreshA
Idempotent

Rescan the transcript directories now instead of waiting for the automatic rescan, and report how many files were scanned, newly recorded, unchanged, or skipped. Only tallybook's own database is written.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
errorsYesone message per failed file
failedYesfiles that could not be parsed
scannedYestranscript files found
ingestedYesfiles newly recorded or re-recorded because they changed
unchangedYes
elapsed_msYes
scan_errorNowhy the most recent scan attempt failed, in which case the figures are from the last successful scan
age_secondsYesseconds since that scan; the server rescans when a tool is called more than 60 seconds after the last attempt, or on refresh
ingested_atYesRFC 3339 time of the last successful transcript scan; empty if none has succeeded yet

TDQS

A4.4/5.0
Behavior4/5

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

Annotations cover the important safety flags—idempotentHint=true, destructiveHint=false, readOnlyHint=false—but the description adds the crucial operational fact that only tallybook's own database is written. It also names the four outcome categories, which is more than the annotations provide. It doesn't describe rate limits, error modes, or how long the rescan takes.

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?

One sentence, front-loaded with the imperative action, then the returned tallies and the write guarantee. No wasted words—every clause earns its place.

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

Completeness4/5

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

For a zero-parameter, side-effecting tool with an output schema, the description plus annotations supply what an agent needs to invoke it safely and know what it will write. The main gap is not explaining what 'transcript directories' are or what prompts a rescan, but that may be out of scope for a trigger tool.

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

Parameters4/5

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

The tool accepts zero parameters, which sets the baseline at 4. The description correctly and consistently indicates no configuration.

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 states a specific action (rescan transcript directories) and explains what it produces (counts of scanned, recorded, unchanged, skipped files). Its namesake siblings—agents, changes, sessions—don't overlap; refresh is set apart as the operational path that bypasses the auto-rescan.

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

Usage Guidelines4/5

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

It clearly implies 'use this when you want the rescan to happen now rather than later', but no explicit when-not or alternative tool is named. There's no sibling that acts as the manual alternative, so the omission is minor.

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

reportA
Read-onlyIdempotent

What the coding agents on this machine cost over a window: the total, the split by tool and by model, and the list of findings about what would have been cheaper. Call finding with an id from the list for the full advice.

ParametersJSON Schema
NameRequiredDescriptionDefault
sinceNowindow: 7d, 30d, 90d, all, or a YYYY-MM-DD start date; default 30d
sourceNorestrict to one tool: "claude-code" or "codex"; default both
compareNoalso return the window of the same length before this one, so the caller can say whether spend rose or fell; not allowed with since=all
projectNorestrict to one project directory, exact match, or a prefix if it ends with a path separator
currencyNooverride the detected plan: "usd" reports as charged, "share" reports as a subscription's list-price equivalent

Output Schema

ParametersJSON Schema
NameRequiredDescription
usdYestotal for the window; see currency
planYes"api" or "subscription", re-detected on every scan
priorNothe window before this one; present only when compare was set
turnsYes
by_dayYesspend per calendar day in the window, by each session's start date in local time; days with no sessions are absent
windowYes
by_modelYescanonical model id to dollars
currencyYes"usd" when the figures were charged, "list_price_equivalent" when a subscription covered them and the figures are what the usage would have cost on the API
findingsYes
main_usdYes
sessionsYesmain sessions in the window
by_sourceYes
subagentsYessub-agent runs in the window
scan_errorNowhy the most recent scan attempt failed, in which case the figures are from the last successful scan
age_secondsYesseconds since that scan; the server rescans when a tool is called more than 60 seconds after the last attempt, or on refresh
ingested_atYesRFC 3339 time of the last successful transcript scan; empty if none has succeeded yet
plan_reasonYeswhy that plan was chosen
subagent_usdYes
skipped_filesYestranscript files the last scan could not parse
cache_hit_rateYesshare of everything sent to the model that was read back from the prompt cache rather than processed afresh, 0..1
unknown_modelsNomodel ids with no price, with the number of turns they appeared on; those turns cost 0 here

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the safety and repeatability profile is covered structurally. The description adds real context — it is machine-local and its findings list is an index into `finding` — but says nothing about cost/volume, latency, or what an empty findings list means. With annotations carrying the safety burden, this is an adequate 3.

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?

Two sentences, no filler, and the highest-value information (what is returned) is front-loaded with the sibling handoff trailing. Every clause earns its place.

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

Completeness4/5

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

An output schema exists, so the description need not enumerate return values, and it correctly focuses on the shape of the answer (total, splits, findings) plus the follow-up call. It is nearly complete; only the when-to-use versus sibling analytics tools like `sessions` or `prices` is left implicit.

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

Parameters3/5

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

Schema description coverage is 100%, so all five parameters (since, source, compare, project, currency) are already documented in the schema, including enum-like values and the compare/since=all conflict. The description only echoes the notion of a 'window,' adding no syntax or default information beyond the schema. Baseline 3 is correct when the schema does the heavy lifting.

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 states a concrete resource and scope: cost of coding agents on this machine over a window, with the total, split by tool and model, and a findings list. It also distinguishes itself from the sibling tool `finding` by explaining that finding holds the full advice for a given id. An agent can pick this over `sessions` or `prices` without opening schemas.

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

Usage Guidelines4/5

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

It explicitly routes the agent to the alternative: 'Call finding with an id from the list for the full advice,' which names both the condition and the sibling to use. It does not say when not to use report (e.g., versus `sessions` for raw per-session data) or note that since=all is incompatible with compare outside the schema, but the primary handoff is clear.

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

sessionA
Read-onlyIdempotent

One session turn by turn: model, effort, token counts and cost per model response. Accepts a full session id or a unique prefix. Never returns prompt text, tool output, or command lines; the database does not hold them.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesfull session id or a unique prefix
currencyNooverride the detected plan: "usd" or "share"

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
usdYes
planYes"api" or "subscription", re-detected on every scan
turnsYes
sourceYes
projectYes
currencyYes"usd" when the figures were charged, "list_price_equivalent" when a subscription covered them and the figures are what the usage would have cost on the API
ended_atYes
subagentsYesthe sub-agent runs this session launched; empty for a session that launched none
agent_typeNo
scan_errorNowhy the most recent scan attempt failed, in which case the figures are from the last successful scan
started_atYes
tool_callsYes
turn_countYeslength of turns, so a caller can size the session without walking it
age_secondsYesseconds since that scan; the server rescans when a tool is called more than 60 seconds after the last attempt, or on refresh
ingested_atYesRFC 3339 time of the last successful transcript scan; empty if none has succeeded yet
plan_reasonYeswhy that plan was chosen
tool_errorsYestool results the harness marked as errors
parent_session_idNoset when this is itself a sub-agent run

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, closed-world), so the bar is lower. The description still adds genuine value by declaring the negative space — it never returns prompt text, tool output, or command lines, and states why (the database does not hold them) — which stops an agent from chasing unavailable data.

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?

Three short sentences, front-loaded with what is returned, followed by the accepted identifier form and the disclosure of what is withheld. Every clause carries information; nothing is padded.

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

Completeness4/5

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

With an output schema present the description needn't explain return values, and it correctly focuses on scope and on the data it cannot supply. The one remaining gap is disambiguation from the `sessions` sibling, which matters given how similar the names are.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already defines both parameters. The description's "full session id or a unique prefix" restates the `id` schema text verbatim and says nothing about the `currency` override or the ambiguity behavior of prefixes, so it adds essentially nothing beyond structured data.

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

Purpose4/5

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

The description names the resource (one session) and enumerates exactly what it returns — model, effort, token counts and cost per model response. That is concrete and distinguishes it from a generic listing tool, but it never distinguishes itself from the near-identically named sibling `sessions`, leaving the singular/plural split unexplained.

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

Usage Guidelines3/5

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

Usage is only implied: the framing "one session" plus the id/prefix note suggests the caller already has a single session identifier. There is no explicit statement of when to use this versus `sessions`, `report`, or `agents`, and no mention of what happens when a prefix is ambiguous.

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

sessionsA
Read-onlyIdempotent

Sessions in the window with what each cost, sorted by cost or by time, most expensive or most recent first. Includes sub-agent runs as their own rows.

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNo"cost" for most expensive first or "time" for most recent first; default time
limitNomaximum rows to return; default 20; 0 returns every row
sinceNowindow: 7d, 30d, 90d, all, or a YYYY-MM-DD start date; default 30d
sourceNorestrict to one tool: "claude-code" or "codex"; default both
projectNorestrict to one project directory, exact match, or a prefix if it ends with a path separator
currencyNooverride the detected plan: "usd" reports as charged, "share" reports as a subscription's list-price equivalent

Output Schema

ParametersJSON Schema
NameRequiredDescription
planYes"api" or "subscription", re-detected on every scan
totalYesrows in the window before the limit
currencyYes"usd" when the figures were charged, "list_price_equivalent" when a subscription covered them and the figures are what the usage would have cost on the API
sessionsYes
scan_errorNowhy the most recent scan attempt failed, in which case the figures are from the last successful scan
age_secondsYesseconds since that scan; the server rescans when a tool is called more than 60 seconds after the last attempt, or on refresh
ingested_atYesRFC 3339 time of the last successful transcript scan; empty if none has succeeded yet
plan_reasonYeswhy that plan was chosen

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the safety profile is covered. The description adds one genuinely useful behavioral fact not in the annotations: sub-agent runs appear as their own rows. Beyond that it discloses nothing about cost computation, auth, or limits.

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 front-loaded sentence that states the resource, the row content, the sort options, and the sub-agent inclusion with no filler. Every clause carries information.

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

Completeness4/5

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

With a full schema and an output schema, return values need not be explained; the description covers scope, ordering, and non-obvious row composition. The main missing context is how it relates to the 'session' and 'agents' siblings, which an agent must infer.

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

Parameters3/5

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

Schema description coverage is 100%, so all six parameters (sort, limit, since, source, project, currency) are fully documented in the schema. The description's mentions of sorting and window mirror existing schema text without adding syntax or format meaning, so the baseline of 3 applies.

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

Purpose4/5

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

The description names the resource (sessions) and what each row contains (what each cost) plus the ordering options, so the agent knows this is a cost-oriented session listing. It does not distinguish itself from the sibling 'session' (singular) or 'agents' tools, so it falls short of a 5.

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

Usage Guidelines3/5

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

The scope ('in the window') and default ordering imply this is a listing tool for session costs over a time window, but there is no explicit when-to-use, no when-not-to-use, and no alternative named despite the presence of a closely related 'session' sibling.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 8 tool updatesv0.1.0
    • First observedagents
    • First observedchanges
    • First observedfinding
    • First observedprices
    • First observedrefresh
    • First observedreport
    • First observedsession
    • First observedsessions

TDQS

A3.8/5.0

Scored across 8 tools

Disambiguation4/5

Most tools target distinct facets: report (aggregate), sessions (list), session (single), agents (sub-agent breakdown), changes (model-change points), finding (one finding), prices, refresh. The main risk is report vs sessions vs agents overlapping in cost-summary territory, and session vs sessions differing only by plural, but descriptions clearly separate them.

Naming Consistency4/5

All names are single lowercase nouns (agents, changes, finding, prices, refresh, report, session, sessions), so the convention is applied consistently. The only weakness is session/sessions and agents/sessions reading similarly, which slightly hurts predictability.

Tool Count5/5

Eight tools is well-scoped for a cost-tracking server, with each tool mapping to a clear function (scan, price table, aggregate report, listing, drill-down, sub-agent detail, model-change tracking, findings). Nothing appears redundant or padded.

Completeness5/5

The surface covers the full lifecycle: refresh to ingest data, prices for computation basis, report/sessions/agents for aggregate and sub-agent views, session for turn-level drill-down, changes for model change comparisons, and finding for full advice with evidence. No obvious gaps or dead ends for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Local-first dashboard + MCP server that parses Claude Code and Codex JSONL files into a SQLite cost / token tracker. Per-MCP and per-tool breakdown, session drill-down, dedup by request_id; never talks to vendor APIs
    5
    100
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables local-first tracking of AI token usage and costs from Claude Code and OpenCode, answering queries about tokens, models, sessions, and cost through MCP tools and a CLI, with no network calls.
    161
    1
    MIT