Skip to main content
Glama

CodeBuddy credit & cost analytics

codebuddy_usage
Read-only

Track CodeBuddy credit, expiring packages, token usage, cache-hit rates, per-model costs, daily consumption, top tasks, and burn-rate runway forecasts from local CLI and swarm run logs.

Instructions

CodeBuddy/WorkBuddy account credit (read-only billing API, cached 10 min, with expiring-soon package alerts) + deduplicated local consumption across both CLI JSONL transcripts and swarm cb-runs state files (including ephemeral runs): tokens & cache-hit rate, per-model/per-profile unit economics, daily breakdown, top tasks, and burn-rate runway forecast.

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": "codebuddy_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
refreshNoSkip the cache and ask the billing API now.
sinceDaysNoLocal consumption window, default 7.
expiringSoonDaysNoExpiring-package warning window in days, default 7.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds substantial behavior: a read-only billing API, a 10-minute cache, expiring-soon package alerts, deduplication across two distinct local sources (CLI JSONL transcripts and swarm cb-runs state files), and inclusion of ephemeral runs. That deduplication and cache disclosure materially affects how an agent interprets results. It stops short of describing failure modes when the billing API or local files are unavailable.

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 main subject (account credit) is front-loaded, but the whole definition is a single dense run-on sentence with nested parentheticals that mixes two data domains and a metric inventory. Every clause carries information, yet the lack of sentence breaks or bullets makes it harder to parse than necessary.

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 no-required-parameter analytics tool with no output schema, the description covers data sources, caching, deduplication scope, and the categories of values returned. Return format and pagination/size limits are unspecified, but the metric enumeration largely substitutes for an 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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it clarifies that the time window applies specifically to local consumption (not billing), and that expiringSoonDays drives the package-expiry alerting. That disambiguates the two overlapping day-window parameters in a way the schema alone does not.

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 concrete resource (CodeBuddy/WorkBuddy account credit plus local consumption) and enumerates the specific outputs (tokens, cache-hit rate, per-model unit economics, burn-rate runway). It is a noun-phrase inventory rather than a clean verb+resource statement, so the action the tool performs is implied rather than stated, but no sibling (hub_*, swarm_*, zcode_*) overlaps this billing/analytics domain.

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 strongly implied: an agent can infer it should call this when it needs credit balance, spend analytics, or a burn-rate forecast. However, there is no explicit when-to-use/when-not statement, no mention of prerequisites or fallbacks, and no guidance about the 10-minute cache versus forcing a refresh decision beyond the schema's own parameter text.

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