---
name: agent-cost-log
description: Cost log for AI agents. One call, or your OpenTelemetry export, turns into cost per run, per tool, per model and per day, with 30-day history. No evals, no prompts, no proxy. Free watch-only mode logs and flags runs over your cap; Pro at $9 a month posts the alert and keeps 30 days.
---
# Agent Cost Log

Works with Claude, Codex, ChatGPT, Grok Bot. Bring your own model.

Connect the MCP server at https://costlog.cloudforbots.com/mcp (Claude Code: `claude mcp add --transport http agent-cost-log https://costlog.cloudforbots.com/mcp`).

## When to use
- `log_costs`: Log what your agent's model and tool calls cost, then get the running total for the run and for today. Pass events (one per call, up to 500) or an OpenTelemetry OTLP/JSON trace export as otel (gen_ai.usage.input_tokens / output_tokens / gen_ai.request.model are read; trace id becomes run_id). Give cost_usd per call, or tokens plus your own per-million prices; nothing is guessed. Optional caps: run_cap_usd and daily_cap_usd. Free watch-only returns would_alert when a cap is crossed; Pro posts one alert per day to alert_webhook. Never blocks or changes your agent.
- `cost_report`: Cost per run, per tool, per model and per day. Without an API key pass run_id (one run). With a key: everything on that key. Free shows 7 days, Pro 30.
- `weekly_report`: Plain-English summary of the last 7 days of spend: total, top runs, top tools, top models, busiest day. Read-only; sends nothing. Needs a free API key.

## Rules
1. Before calling, state in one line what you understood the user wants.
2. Report the tool's `job` and `outcome` lines to the user.
3. If you get `free_limit_reached`, tell the user the free tier is 500/day and share the $9/month link: undefined
