Get AI Tool Activity (Claude Code cost per developer)
get_ai_tool_activityClaude 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
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | Which AI coding tool to report on. Only "claude_code" (the default) is available. | claude_code |
| end_date | Yes | Window end, YYYY-MM-DD, inclusive (e.g. "2026-11-18"). | |
| start_date | Yes | Window start, YYYY-MM-DD (e.g. "2026-11-01"). The window may span at most 366 days. | |
| integration_id | No | Limit to one Anthropic integration (its id from list_integrations) when the organization has several. Omit for all of them. | |
| response_format | No | concise (default) = team totals only. detailed = team totals plus one entry per developer (`developers`) and a daily trend (`daily`). | concise |