Skip to main content
Glama

get_session_analytics

Analyze AI agent session logs to track token usage, cost breakdown by tool/server, top files accessed, and models used. Parses Claude Code JSONL logs automatically.

Instructions

Analyze AI agent session logs: token usage, cost breakdown by tool/server, top files, models used. Parses Claude Code JSONL logs automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodNoTime period (default: week)
session_idNoSpecific session ID to analyze
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that the tool 'parses Claude Code JSONL logs automatically', which hints at input processing, but fails to describe critical behaviors such as whether this is a read-only operation, what permissions are required, the format or structure of the output (e.g., aggregated statistics vs. raw logs), or any rate limits or constraints. This leaves significant gaps for a tool that analyzes logs.

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 concise and front-loaded, efficiently stating the tool's purpose in a single sentence. However, it could be slightly improved by structuring it to separate core functionality from implementation details (e.g., moving 'Parses Claude Code JSONL logs automatically' to a secondary point), but overall, it avoids unnecessary verbosity.

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 complexity of analyzing session logs and the lack of annotations and output schema, the description is incomplete. It does not explain what the analysis output includes (e.g., token usage breakdown, cost details), how results are formatted, or any behavioral constraints. For a tool with no structured output documentation, this leaves the agent with insufficient context to understand the tool's full behavior.

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 schema description coverage is 100%, with both parameters ('period' and 'session_id') well-documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as explaining how 'period' affects analysis scope or clarifying that 'session_id' overrides 'period'. Since the schema does the heavy lifting, the baseline score of 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?

The description clearly states the tool's purpose with specific verbs ('analyze', 'parses') and resources ('AI agent session logs', 'Claude Code JSONL logs'), and it distinguishes itself from sibling tools by focusing on session analytics rather than code analysis, refactoring, or other operations present in the sibling list.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention any prerequisites, exclusions, or compare it to similar tools like 'get_session_stats' or 'discover_claude_sessions' from the sibling list, leaving the agent to infer usage context.

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/nikolai-vysotskyi/trace-mcp'

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