Skip to main content
Glama

openclaw-cost-tracker-mcp

Телеметрия стоимости токенов для OpenClaw, доступная для запросов из Claude или любого агента с поддержкой MCP. Атрибуция по агентам и провайдерам, обнаружение аномальных скачков затрат, рекомендации по маршрутизации моделей, 30-дневный прогноз. Дополнение к silentwatch-mcp и openclaw-health-mcp.

Status: v1.0.0 License: MIT MCP PyPI


Что он делает

Промышленные AI-решения накапливают расходы на токены у множества провайдеров, десятков агентов и сотен вызовов навыков. Счет приходит в конце месяца — и к этому моменту ответ на вопрос «куда ушли наши деньги?» погребен под 100 тысячами строк логов. Этот MCP-сервер выводит эти данные в реальном времени, доступные для запроса на обычном английском языке изнутри Claude:

> claude: where did our LLM spend go this week?
[MCP tools: cost_overview + top_cost_drivers]

Total spend last 7 days: $42.18
By provider:
  Anthropic    $30.40 (72%) — claude-sonnet-4 dominates
  OpenAI       $9.20  (22%) — chat-bot agent
  Gemini       $1.86  (4%)  — cron-summarizer (cheap-route working)
  Ollama       $0.00  (local, free)

Top 3 cost drivers:
  data-extraction-agent      $28.50 (68%)
  chat-bot                   $9.20  (22%)
  cron-summarizer            $1.86  (4%)

1 anomaly flagged — see find_cost_anomalies for details.
> claude: any cheaper-routing opportunities?
[MCP tool: model_routing_recommendations]

Recommendation: data-extraction-agent currently runs claude-sonnet-4
with avg 400-token completions — extraction-style work that
gemini-2.5-flash usually handles at ~95% quality for ~5% the cost.
Estimated savings: $27.10/30d if migrated. Test on a 10% slice first.

Related MCP server: nikhilnt

Почему openclaw-cost-tracker-mcp

Три вещи, которые не делают существующие инструменты (биллинговые панели провайдеров, общие FinOps-инструменты, пользовательские скрипты):

  1. Атрибуция по агентам, а не только общие суммы по провайдерам. Панели провайдеров показывают «$X потрачено на Anthropic» — они не могут сказать, какой из ваших шести агентов вызвал 78% этих затрат. Трекер затрат считывает JSONL-логи стоимости каждого запроса OpenClaw и агрегирует их с сохранением agent_id.

  2. Обнаружение аномалий скачков затрат по агентам. Одна вставка 120 тысяч токенов в чат стоит дороже, чем неделя обычного трафика. Порог по умолчанию в 3x от медианы на агента помечает такие случаи до того, как они появятся в счете в конце месяца.

  3. Рекомендации по маршрутизации, основанные на фактическом использовании. Общие советы «используйте более дешевые модели» бесполезны. Этот сервер определяет конкретных агентов, чей паттерн объема и длины завершения подсказывает, что более дешевый провайдер обеспечил бы тот же результат, с конкретными оценками экономии за 30 дней.

Создан для операторов промышленного AI, запускающих OpenClaw в продакшене с реальными расходами, которые имеют значение.


Инструментарий

Инструмент

Что возвращает

cost_overview

Общие затраты + по провайдерам + топ агентов + топ моделей + количество аномалий за период

costs_by_agent

Разбивка по агентам со средней стоимостью запроса + доля от общего объема

costs_by_provider

Разбивка по провайдерам с количеством токенов

find_cost_anomalies

Запросы, помеченные как превышающие медианную стоимость агента в 3+ раза

top_cost_drivers

Топ N агентов и моделей по затратам, без лишнего шума

model_routing_recommendations

Конкретные предложения по более дешевым моделям с оценкой экономии за 30 дней

forecast_monthly_cost

Прогноз общих затрат на 30 дней + по провайдерам с примечанием о достоверности

Ресурсы:

  • cost://overview — 7-дневный снимок

  • cost://forecast — 30-дневный прогноз

  • cost://anomalies — недавно обнаруженные аномалии

Промпты:

  • diagnose-cost-spike — анализ недавнего скачка до первопричины + корректирующие действия

  • weekly-cost-digest — еженедельный дайджест затрат на 200 слов


Быстрый старт

Установка

pip install openclaw-cost-tracker-mcp

Настройка для Claude Desktop

Добавьте в ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) или %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "openclaw-cost": {
      "command": "python",
      "args": ["-m", "openclaw_cost_tracker_mcp"],
      "env": {
        "OPENCLAW_COST_BACKEND": "mock"
      }
    }
  }
}

Бэкенды

Бэкенд

Статус

Описание

mock

✅ v1.0

Пример данных с преднамеренными аномалиями + возможностями маршрутизации для проверки протокола

openclaw-jsonl

✅ v1.0

Парсит нативные JSONL-файлы логов стоимости OpenClaw (по умолчанию ~/.openclaw/cost-logs/, настраивается через OPENCLAW_COST_LOGS)

provider-direct

⏳ v1.1

Считывает данные напрямую из биллинговых API Anthropic + OpenAI (не требуется прослойка логов)

Формат логов JSONL

Каждая строка — это одна JSON-запись:

{"request_id":"req-abc123","timestamp":"2026-05-04T12:34:56Z","provider":"anthropic","model":"claude-sonnet-4","agent_id":"data-extraction-agent","skill_id":"extract-structured-data","prompt_tokens":8500,"completion_tokens":600,"total_tokens":9100,"cost_usd":0.0345,"duration_ms":4823}

Если ваше развертывание OpenClaw не выводит данные в этом формате, оберните вызовы провайдеров небольшой прослойкой логирования — пример прослойки в examples/.


Дорожная карта

Версия

Область применения

Статус

v1.0

бэкенды mock + openclaw-jsonl, 7 инструментов / 3 ресурса / 2 промпта, обнаружение аномалий + маршрутизация + прогноз, матрица CI GitHub Actions, доверенная публикация PyPI

✅

v1.1

бэкенд provider-direct (интеграции с биллинговыми API Anthropic + OpenAI)

⏳

v1.2

Федерация бэкендов; оповещения о бюджете + обнаружение превышения порогов

⏳

v1.x

Атрибуция затрат по каналам; эмиттер вебхуков для оповещений о бюджете

⏳


Нужно адаптировать под ваш стек?

Если ваше AI-развертывание не использует формат логов стоимости OpenClaw — другая система агентов, кастомное логирование, замеры AWS Bedrock, биллинговый API вендора — и вы хотите получить ту же видимость атрибуции + аномалий + маршрутизации, это задача для Custom MCP Build.

Уровень

Область применения

Инвестиции

Сроки

Простой

Адаптер одного бэкенда для вашего существующего источника данных о затратах

$8,000–$10,000

1–2 недели

Стандарт

Кастомный бэкенд + кастомные правила аномалий + интеграция с вашими оповещениями

$15,000–$20,000

2–4 недели

Сложный

Федерация нескольких бэкендов + контроль бюджета + кастомная логика маршрутизации

$25,000–$35,000

4–8 недель

Для заказа:

  1. Напишите на temur@pixelette.tech с темой Custom MCP Build inquiry

  2. Включите: описание вашего стека в 1 абзаце + какой уровень вы рассматриваете

  3. Ответ в течение 2 рабочих дней с предложением слота для 30-минутного ознакомительного звонка

Этот сервер является частью MCP-комплекта для промышленной AI-инфраструктуры — дополнение к silentwatch-mcp (обнаружение скрытых сбоев cron) и openclaw-health-mcp (здоровье развертывания). Установите все три для полной операционной видимости.


Аудиты промышленного AI

Если вы используете AI в продакшене и хотите, чтобы внешний специалист оценил готовность, нашел уже существующие паттерны сбоев (перерасход средств — один из самых распространенных) и составил план корректирующих действий:

Уровень

Область применения

Инвестиции

Сроки

Audit Lite

Одна система, топ-5 находок, письменный отчет

$1,500

1 неделя

Audit Standard

Полный аудит, все 14 паттернов, 5 находок Cs, 90-дневное сопровождение

$3,000

2–3 недели

Audit + Workshop

Стандартный аудит + 2-дневный командный воркшоп + первый ежемесячный аудит включен

$7,500

3–4 недели

Тот же канал связи: temur@pixelette.tech с темой AI audit inquiry.


Вклад в проект

PR приветствуются. Бэкенды подключаемые — см. src/openclaw_cost_tracker_mcp/backends/ для контракта.

Чтобы добавить новый бэкенд:

  1. Создайте подкласс CostBackend в backends/<ваш_бэкенд>.py

  2. Реализуйте get_entries()

  3. Зарегистрируйте в backends/__init__.py

  4. Добавьте тесты в tests/test_backend_<ваш_бэкенд>.py

Отчеты об ошибках + запросы функций: откройте issue на GitHub.


Лицензия

MIT — см. LICENSE.


Связанные проекты

  • silentwatch-mcp — обнаружение скрытых сбоев cron

  • openclaw-health-mcp — здоровье развертывания

  • AI Production Discipline Framework — шаблон Notion, $29 — методология, которую реализуют эти MCP-инструменты (перерасход средств — это паттерн P3.x в каталоге)

  • SPEC.md — полная спецификация сервера


Создано Temur Khan — независимым специалистом по промышленным AI-системам. Контакт: temur@pixelette.tech

Available Tools

7 tools
cost_overviewA

Top-level cost summary for a window — total spend, request count, by-provider breakdown, top agents, top models, anomaly count. Use this first for a single-pane view.

ParametersJSON Schema
NameRequiredDescriptionDefault
window_hoursNoLookback window in hours (default 168 = 7 days, max 720 = 30 days)
top_nNoHow many top agents + models to include (default 5)

TDQS

A4/5.0
Behavior3/5

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

No annotations provided, so description carries the burden. Description implies read-only behavior (cost summary), but does not explicitly state non-destructiveness, rate limits, or other traits.

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?

Two sentences with zero waste. Front-loaded with output items. Every sentence earns its place.

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?

No output schema, but description lists all expected return components (total spend, request count, breakdowns, top agents/models, anomalies). Adequate for a top-level summary tool.

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 coverage is 100% (both parameters described). Description adds no additional meaning beyond what the schema provides, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states verb (summary) and specific resource (top-level cost for a window). It lists the exact components returned and distinguishes from siblings via 'use this first for a single-pane view'.

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?

Explicitly says 'Use this first for a single-pane view', implying it's the entry point. No explicit when-not or alternatives, but the sibling list provides context for other tools.

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

costs_by_agentB

Per-agent cost breakdown — total spend + request count + avg cost-per-request + primary provider/model + share of total spend, sorted by cost descending.

ParametersJSON Schema
NameRequiredDescriptionDefault
window_hoursNo

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It does not disclose whether the tool is read-only, destructive, or has auth/rate limits. Since it likely just queries data, a note about idempotency would be beneficial.

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 description is a single sentence that efficiently lists all output fields and the sort order. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the output well but omits the single input parameter entirely. Given no output schema, this is a notable gap for input comprehension.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one optional parameter (window_hours) with 0% schema description coverage. The description does not mention this parameter at all, failing to explain its meaning or effect on results. The description adds no value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it provides a per-agent cost breakdown with specific metrics (total spend, request count, avg cost-per-request, primary provider/model, share of total spend, sorted by cost descending). This distinguishes it from sibling tools like cost_overview (likely overall) or costs_by_provider.

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?

The usage is implied from the purpose (use when you need per-agent costs), but there is no explicit guidance on when to use this tool versus alternatives, no prerequisites, and no mention of when not to use it.

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

costs_by_providerB

Per-provider cost breakdown — total spend + request count + token counts + share of total, sorted by cost descending.

ParametersJSON Schema
NameRequiredDescriptionDefault
window_hoursNo

TDQS

B3/5.0
Behavior2/5

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

With no annotations provided, the description is responsible for behavioral disclosure. It mentions output metrics and sorting but omits key details such as that it is a read-only operation, how the time window (window_hours) affects results, or any limits/pagination.

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

Conciseness4/5

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

The description is a single concise sentence that front-loads the key information (what the tool returns and how it is sorted), with no superfluous content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one optional parameter, no output schema, and several siblings, the description fails to explain the parameter or provide usage guidance, making it incomplete despite adequately covering purpose and basic output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one parameter (window_hours) with 0% description coverage in the schema. The description does not mention window_hours at all, leaving the agent unaware of how to specify the time range for the breakdown.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it provides a per-provider cost breakdown with specific metrics (total spend, request count, token counts, share of total) sorted by cost descending, which distinguishes it from siblings like costs_by_agent and cost_overview.

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?

The description implies the tool is for per-provider breakdowns but does not explicitly state when to use it over alternatives like costs_by_agent or cost_overview, nor does it provide exclusions or context for when it is appropriate.

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

find_cost_anomaliesA

Requests whose cost is threshold_multiplierx or more above their agent's median request cost. Default 3.0x. Surfaces giant-context-paste accidents, runaway loops, model regressions, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
window_hoursNo
threshold_multiplierNoMultiplier above agent median to flag (default 3.0, min 1.5)

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It explains the tool flags requests exceeding a threshold, but does not disclose if it modifies data, requires permissions, or the format of returned anomalies. This is adequate but leaves gaps.

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?

Two sentences suffice to convey purpose, examples, and default values. Information is front-loaded and no unnecessary words are present.

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?

Given no output schema, the description could elaborate on the output format. However, the context of sibling cost tools and the clear examples provide sufficient completeness for a diagnostic tool.

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 50% with only threshold_multiplier having a description. The tool description adds meaning by explaining the purpose of threshold_multiplier (default 3.0x, min 1.5) and implies window_hours as a time window. This provides useful context beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'find' and resource 'cost anomalies', clearly distinguishes from sibling tools like cost_overview or top_cost_drivers, and provides concrete use cases (giant-context-paste accidents, runaway loops).

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?

The description implies usage for detecting anomalous cost spikes with examples, but does not explicitly state when not to use it or compare to alternatives. However, the context of sibling tools makes its purpose distinct.

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

forecast_monthly_costA

Projects 30-day total spend from the observed window's run rate. Returns per-provider 30d projection + confidence note. Re-run with longer window for stability.

ParametersJSON Schema
NameRequiredDescriptionDefault
window_hoursNoHours of observed data to project from (default 168 = 7 days)

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses that the tool returns a per-provider projection and confidence note and suggests re-running for stability, but does not explicitly state whether the operation is read-only or discuss any side effects or permissions needed.

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 description is three short, front-loaded sentences with no filler. Each sentence adds value: purpose, return structure, and usage advice. It is efficient and well-structured.

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 tool with one optional parameter and no output schema, the description adequately covers what it does and returns (per-provider projection, confidence note). It is mostly complete, though it could specify the format of the projection or confidence level more precisely.

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?

The input schema already provides 100% coverage (window_hours with description and default). The description adds no new parameter meaning beyond the schema, only context about stability. Baseline 3 is appropriate as the description does not detract but adds minimal extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool projects 30-day total spend from observed run rate, with a specific verb ('projects') and resource ('30-day total spend'). It distinguishes from sibling tools like cost_overview or costs_by_provider by focusing on forecasting rather than current breakdowns.

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?

The description advises re-running with a longer window for stability, implying when to adjust the parameter, but it does not explicitly state when to use this tool versus alternatives like find_cost_anomalies or top_cost_drivers. No when-not or comparator guidance is provided.

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

model_routing_recommendationsA

Suggestions to route some volume to cheaper providers/models — e.g., claude-sonnet-4 → gemini-2.5-flash for extraction-style work, gpt-4o → gpt-4o-mini for short chats. Each rec includes 30d estimated savings.

ParametersJSON Schema
NameRequiredDescriptionDefault
window_hoursNoWindow over which to find candidates (default 720 = 30 days)

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It lacks details on side effects (e.g., does it modify anything?), permissions, limitations, or how suggestions are generated. The description only states output (suggestions with savings) but not behavior beyond that.

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 description is two sentences, front-loaded with the main purpose, and uses concrete examples to clarify. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for a recommendation tool but lacks details on output format, number of suggestions, or prerequisites (e.g., required cost data). Without output schema, more behavioral context would be helpful for an agent to use it correctly.

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?

The single parameter 'window_hours' is fully described in the schema (coverage 100%). The description adds no additional meaning beyond what the schema provides, so baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it provides suggestions to route volume to cheaper providers/models, with specific examples and mention of 30d estimated savings. It is easily distinguishable from sibling tools which focus on cost analysis rather than recommendations.

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?

The description does not explicitly state when to use this tool versus alternatives. While the sibling tool names give implicit context, there is no guidance on when to recommend routing vs. other cost actions, or exclusions for certain scenarios.

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

top_cost_driversA

Highest-spend agents + models in the window — flat list, no per-provider or anomaly noise. Useful for 'where's our money going' digest format.

ParametersJSON Schema
NameRequiredDescriptionDefault
window_hoursNo
top_nNo

TDQS

A4.3/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that results are a flat list without per-provider or anomaly noise, which is sufficient for a simple query tool. Lacks mention of data freshness or side effects, but none expected.

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?

One concise sentence plus a usage suggestion; no filler words. Front-loaded with key information.

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?

Given low complexity (2 optional params, no output schema), description adequately covers purpose, format, and use case. Could add details on output fields or ordering, but not critical for a digest.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must compensate. It does not explicitly explain window_hours or top_n parameters, only implying a time window and top N via context. Defaults are in schema but not described.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description explicitly states it identifies 'highest-spend agents + models' and contrasts with siblings by saying 'flat list, no per-provider or anomaly noise,' making purpose and differentiation clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly suggests use case: 'where's our money going' digest format, and implicitly advises against using when per-provider breakdowns or anomalies are needed, referencing sibling tools.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv1.0.0
    • First observedcost_overview
    • First observedcosts_by_agent
    • First observedcosts_by_provider
    • First observedfind_cost_anomalies
    • First observedforecast_monthly_cost
    • First observedmodel_routing_recommendations
    • First observedtop_cost_drivers

TDQS

A3.8/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct cost analysis aspect: overview, agent/provider breakdown, anomalies, forecasting, recommendations, and top drivers. No overlap in functionality.

Naming Consistency5/5

All tool names use consistent lowercase underscore pattern, clearly indicating their purpose (e.g., cost_overview, find_cost_anomalies). Pattern is predictable and readable.

Tool Count5/5

Seven tools is ideal for a focused cost tracker; each tool covers a specific need without redundancy or bloat.

Completeness4/5

Covers core cost analysis needs (overview, breakdowns, anomalies, forecasting, optimization). Minor gaps like filtering or export are acceptable given the scope.

Maintenance

ActivityStale
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides intelligent analysis of token usage patterns and optimization recommendations to improve efficiency and reduce costs in Claude Code sessions. Offers real-time analysis, cost metrics, and actionable insights for better context window and tool usage optimization.
    3 npm
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Local LLM cost & token forensics proxy with anomaly detection, enabling security teams to scan for cost anomalies and abuse patterns, and expose results via MCP for autonomous agents.
    -