Skip to main content
Glama

ctxray_trace

Analyze AI coding agent session JSONL logs (Claude Code, Codex, Cursor) to pinpoint context bloat, prompt-cache breaks, and token/USD savings.

Instructions

Analyze AI coding agent session JSONL logs (Claude Code, Codex, Cursor) to pinpoint context bloat offenders, prompt-cache breaks, and token/USD savings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
demoNoRun on built-in benchmark session trace
trace_pathNoOptional path to session trace file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, and it discloses very little: it never states whether the analysis is read-only, whether it writes reports to disk, what permissions or file access it needs, or whether invoking it incurs the token/USD costs it reports on. 'Token/USD savings' hints at reporting output but not at any behavioral trait.

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?

A single dense sentence with the action, the input domain, and the value proposition front-loaded; every clause earns its place with no filler.

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?

No output schema and no annotations, yet the description summarizes the analytical results returned, so the core need is met. It leaves gaps around what happens when neither optional parameter is supplied and how demo mode relates to trace_path, which for a zero-required-param tool is a meaningful omission.

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%, so the schema already documents both parameters ('demo' and 'trace_path'), establishing the baseline of 3. The description's mention of 'session JSONL logs' conceptually contextualizes trace_path but adds no format or interaction detail beyond the schema.

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

Purpose4/5

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

States a specific verb ('Analyze') and resource ('AI coding agent session JSONL logs'), and enumerates the agent formats handled (Claude Code, Codex, Cursor) plus the outputs produced (context bloat, prompt-cache breaks, token/USD savings). This clearly separates it from siblings like ctxray_repo_map or ctxray_skeletonize, though it never names an alternative, keeping it just short of a 5.

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 explains what the tool does but gives no guidance on when to choose it over siblings (e.g. ctxray_forensics, which sounds adjacent), no prerequisites, and no indication of when either parameter should be used. Usage must be inferred entirely from the description's topic.

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