Skip to content

Llm Costs Query

Aggregate LLM cost / usage across one or both data sources (work-buddy's per-call internal log + Claude Code transcripts). Smart parameters: time window (named or ISO range), group_by (project, model, session, day, tool), source filter, min_cost / project / model filters, and previous-window comparison. Single capability covering most cost questions.

MCP name: llm_costs_query

Category: llm

Parameters

Name Type Required Description
compare_to_previous bool No Include previous-equivalent-window comparison (delta_pct_cost, delta_pct_calls). Default true.
group_by str No Optional breakdown: 'project', 'model', 'session', 'day', 'tool'. Omit for top-line totals only.
include_local bool No Include local-LLM rows? Default true.
min_cost float No Filter rows where cost_usd < this. Default 0.
model str No Exact-match model filter (e.g. 'claude-sonnet-4-6').
project str No Substring match on project name / cwd.
source str No 'all' (default), 'internal' (work-buddy's runner calls), or 'claude_code' (Claude Code transcripts).
top_n int No Cap on grouped rows. Default 10. Pass 0 for no cap.
window str No Time window. Named: 'today', 'yesterday', '7d', '30d', '90d', 'month_to_date', 'all'. ISO range: 'YYYY-MM-DD..YYYY-MM-DD'. Single day: 'YYYY-MM-DD'. Default '30d'.