Skip to main content
Glama

usage_report

Read-only

Generate a read-only report of local Codex/Claude Code usage for a task or session, linking sources and subagents. Use when asked about work usage.

Instructions

Report local Codex/Claude Code usage when the user asks about work usage. Pass task (Task Passport id; omit for the current task) to report the sources linked to it; sessions that ran Agentpack for the task (and their subagents) are included automatically; if none are traced or linked, the result lists candidate sessions of the task worktree to link with usage_link. Task reports count only requests made while the task was the current Passport; a subagent counts whole for the task current when it started. Alternatively supply manifest, or client/files for a direct report. Same read-only report as CLI usage report; no collection, rates or ledger writes. Includes estimated Agentpack call overhead, not schema cost or billing. Optional byTurn shows boundaries and turns selects N, N: or N:M in one file. Monetary snapshots are source-session estimates, unavailable for filtered ranges. Supported clients: Codex and Claude Code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoExclusive ISO timestamp with timezone.
fromNoInclusive ISO timestamp with timezone.
jsonNoReturn aggregate report JSON as text instead of human-readable text.
taskNoTask Passport id whose linked sources to report (omit for the current task). With client/files it is only a descriptive label.
filesNoExplicit local JSONL paths; relative paths resolve from the pack root.
turnsNoInclusive N or N:M turn selection; exactly one file required.
byTurnNoInclude source-local turn rows.
clientNo
manifestNoLocal task usage manifest; exclusive with direct source options. Paths inside it resolve from its directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.9.0

TDQS

A4.1/5.0
Behavior5/5

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

With readOnlyHint=true and openWorldHint=false already covering the safety profile, the description adds substantial context: no collection/rates/ledger writes, overhead estimation caveats, subagent counting semantics, and that monetary snapshots are unavailable for filtered ranges. This is rich behavioral disclosure well beyond the annotations.

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

Conciseness3/5

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

The purpose is front-loaded, but the body is a dense run-on block of semicolon-chained clauses mixing modes, counting rules, and caveats. Information is present but not well segmented, forcing the reader to parse a single sprawling paragraph.

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 9-parameter tool with a complex oneOf schema and no output schema, the description covers the invocation modes, counting semantics, and monetary caveats needed to call it correctly. It is fairly complete, though the mode interactions could be crisper.

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?

Schema coverage is already high (89%), so the baseline is 3, but the description adds real meaning: 'task' as a Task Passport id (omit for current), 'turns' accepting N, N: or N:M in a single file, and the interplay between task/manifest/client+files modes. It explains parameter combinations the schema's oneOf only implies.

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 opening sentence states a specific verb and resource ('Report local Codex/Claude Code usage') and a triggering condition. It also names the related sibling usage_link, but does not clearly distinguish itself from the many other task/source-reporting siblings. A clear purpose, but sibling differentiation is only partial.

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 gives explicit context ('when the user asks about work usage') and describes the three invocation modes (task, manifest, or client/files) plus when to follow up with usage_link. It stops short of stating when NOT to use this versus alternatives like source_status, but the guidance is solid.

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