Skip to main content
Glama

Get AI Tool Activity (Claude Code cost per developer)

get_ai_tool_activity
Read-only

Claude Code cost per developer: Anthropic's billed dollars for Claude Code next to its usage — sessions, commits, pull requests, lines added and removed, tool accept rate and cache hit rate — with cost per session, per pull request, per active developer and per active day. COVERAGE: only Claude Code used with Claude Console sign-ins or Console API keys, read through the organization's Anthropic integration. It does NOT include Claude Code used through Pro, Max, Team or Enterprise seats, or through Amazon Bedrock, Google Vertex AI or Microsoft Foundry. Every answer carries coverageNote; state that limit when you report the figures, and never present zero here as "nobody used Claude Code". BILLED, NOT ESTIMATED: billedCost and every cost ratio come from Anthropic's billing and match the Anthropic Console. When billedComplete is true, say the figures are billed, not estimated. When it is false, the last day or two are not billed yet and estimatedCost is Anthropic's estimate — label it as an estimate. A null ratio means nothing is billed yet, not zero. Read costNote. These dollars are already part of the Anthropic total in get_ai_spend — never add the two together. ACTIVITY NEEDS TELEMETRY: sessions, commits, pull requests, lines, tool accepts and tokens come from Claude Code telemetry. When Anthropic reported none, those fields are null (unknown, not zero) and activityNote says so — never report them as 0. TEAM-LEVEL BY DEFAULT: response_format "concise" (default) returns team totals (billedCost, estimatedCost, activeDevelopers, sessions, commits, pullRequests, linesAdded, linesRemoved, toolAcceptRate, cacheHitRate, costPerSession, costPerPullRequest, costPerActiveDeveloper). "detailed" adds developers — one entry per person (actor is their email, or "Name removed" once their email has been removed from CloudQuell (their usage still counts in the team totals)), per API key, and an "(unattributed)" entry for spend Anthropic ties to no developer — listed by cost as on the dashboard, each with the same figures plus activeDays, costPerActiveDay, lastActiveDate and topModel, and daily (billedCost, estimatedCost, activeDevelopers and sessions for every day). Report per-developer figures as context for the team, not as a ranking or a performance measure. LOCKED: if this returns "locked", the organization's plan does not include Claude Code cost per developer yet — tell the user that, and do not retry. tool is "claude_code" (the only one, and the default). Required start_date/end_date (YYYY-MM-DD, at most 366 days); optional integration_id for one Anthropic integration. Read-only — never modifies anything. Example: { "start_date": "2026-11-01", "end_date": "2026-11-18" } returns the team's Claude Code cost and activity for November so far.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "get_ai_tool_activity"
  }
}

Input Schema

NameRequiredDescriptionDefault
toolNoWhich AI coding tool to report on. Only "claude_code" (the default) is available.claude_code
end_dateYesWindow end, YYYY-MM-DD, inclusive (e.g. "2026-11-18").
start_dateYesWindow start, YYYY-MM-DD (e.g. "2026-11-01"). The window may span at most 366 days.
integration_idNoLimit to one Anthropic integration (its id from list_integrations) when the organization has several. Omit for all of them.
response_formatNoconcise (default) = team totals only. detailed = team totals plus one entry per developer (`developers`) and a daily trend (`daily`).concise

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnly/openWorld, but the description discloses far more: billed vs estimated semantics on `billedComplete`, null meanings for unbilled ratios and missing telemetry ('unknown, not zero'), the '(unattributed)' bucket, the 'Name removed' redaction rule, and a privacy directive not to frame per-developer figures as rankings. These are exactly the behavioral traits an agent could not infer from structured fields.

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 purpose is front-loaded and the remaining text is broken into labeled blocks (COVERAGE, BILLED NOT ESTIMATED, ACTIVITY NEEDS TELEMETRY, TEAM-LEVEL BY DEFAULT, LOCKED) that are easy to scan. It is dense and somewhat long for a 5-parameter tool, with a few near-duplicate warnings about not reporting nulls as zero, but almost every sentence carries distinct operational value.

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

Completeness5/5

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

There is no output schema, and the tool is unusually complex — so the description carries the full burden of explaining the returned field set, the two response shapes, the cost-vs-estimate distinction, and degraded-data states. It covers all of that, including what a locked response means for the caller.

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; the description goes beyond it by spelling out what each `response_format` value actually returns (`totals` fields for concise, `developers`/`daily` for detailed) and by flagging that `tool` has exactly one valid value. The 366-day cap and date format are already in the schema, so the gain is modest rather than transformative.

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 opening sentence names a specific verb-and-resource pair (billed Claude Code dollars plus usage metrics, per developer) and enumerates the measures returned. It also explicitly separates itself from the sibling get_ai_spend by stating these dollars are already inside that total and must never be added to it.

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?

The description gives explicit when-to-use context (Claude Code on Console sign-ins/API keys only), when-not (Pro/Max/Team/Enterprise seats, Bedrock, Vertex, Foundry are out of scope), what to do about alternatives (get_ai_spend already includes these dollars), and how to behave on the 'locked' state — tell the user, do not retry.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources