Skip to main content
Glama
dambinhtu-nhuy

claude-code-session-mcp

Tally tool calls across sessions

tool_usage
Read-only

Count how often each Claude Code tool was called across matching sessions to reveal working habits, such as reading versus editing time. Returns tool names and usage counts.

Instructions

Count how often each Claude Code tool (Read, Edit, Bash, Grep and the rest) was called across the sessions matching the filters, most used first. Use it to answer questions about working habits, such as how much of a week was reading versus editing. Returns tool names and counts, never tool arguments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceNoEarliest day to include, YYYY-MM-DD, inclusive.
untilNoLatest day to include, YYYY-MM-DD, inclusive.
projectNoOnly this project. Claude Code names it after the working directory with separators replaced by dashes, for example c--dev-myapp.
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description goes further by specifying return details: tool names and counts, ordering, and the guarantee that tool arguments are never included. It does not contradict annotations and adds privacy-relevant behavioral context beyond the 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.

Conciseness5/5

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

Three sentences, all substantive: first sentence states the aggregation and ordering, second gives the usage scenario, third explains the output and a privacy boundary. No filler or repetition.

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?

With no output schema, the description appropriately discloses the return shape (tool names and counts, no arguments), ordering, and the type of questions it answers. For a simple aggregation tool with well-described optional filters and read-only semantics, this is sufficient to select and invoke 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?

Schema description coverage is 100%, with each parameter (since, until, project) clearly documented in the schema. The description only refers generically to 'filters' and adds no new parameter-level information, so it meets the baseline of 3 without surpassing it.

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 identifies the action (count), the resource (Claude Code tool calls across sessions), the output ordering (most used first), and the specific filtering context. The examples of tools and the intent (working habits) distinguish it from sibling tools that list sessions or provide session-level stats.

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 explicitly states the intended use case: answering questions about working habits, with a concrete example (reading versus editing). It does not, however, mention when not to use it or point to list_sessions/session_stats as alternatives, so it stops short of explicit exclusion guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dambinhtu-nhuy/claude-code-session-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server