Skip to main content
Glama

promptbill_scan_usage

Scans local AI coding logs and returns per-Git-repository token counts, sessions, models, and USD cost breakdown so you can track AI spend by project.

Instructions

Scan local AI coding logs (Claude Code, OpenAI Codex CLI, Gemini CLI, Cline, Roo Code, and imported CSVs) and return per-Git-repository token counts, sessions, models, and USD cost breakdown. 100% local-first.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "promptbill_scan_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoLimit scan to the last N days (e.g., 30).
demoNoSet true to preview with realistic demo data.
reposNoOptional list of Git repository names to filter.
toDateNoOptional inclusive end date (YYYY-MM-DD).
fromDateNoOptional inclusive start date (YYYY-MM-DD).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden and does add useful context: it states the operation is local-first and identifies supported log sources. However, it does not explicitly confirm read-only behavior, side effects, permissions, or whether any files are modified during scanning.

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?

The definition is two compact sentences with the core action and return values front-loaded. The source list and local-first note are tightly integrated, and no sentence is wasted.

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 five-parameter, optional-parameter scan tool with no output schema and no annotations, the description adequately explains what is scanned and what is returned. It does not mention demo mode or date-filter interactions, but those are covered by the schema, so the remaining gap 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 input schema already documents all five optional parameters, including date filters, repo filtering, and demo mode. The description adds no parameter-level meaning beyond the schema, which is the expected baseline when coverage is complete.

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 verb (Scan) and resource (local AI coding logs) and lists the exact output dimensions: per-repository token counts, sessions, models, and USD cost. It is clear what the tool does, though it does not explicitly differentiate itself from siblings such as promptbill_repo_spend or promptbill_export_csv.

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?

The description provides no explicit when-to-use guidance, no exclusions, and no named alternatives. A reader can infer that this is for scanning local AI logs, but the definition does not say when to choose it over promptbill_repo_spend, promptbill_export_csv, or promptbill_generate_invoice_pdf.

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