Skip to main content
Glama

xray_transcripts

Read-onlyIdempotent

Audit local Claude Code JSONL transcripts offline to quantify unwindowed reads, cache idle cliffs, and largest tool-output offenders without exposing file contents, commands, or paths.

Instructions

Run a 100% offline, read-only diagnostic on local Claude Code JSONL transcripts to quantify unwindowed file reads (>350 lines), >5-minute prompt-cache idle cliffs, and largest tool-output context offenders without exposing file contents, shell commands, or full paths.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "xray_transcripts"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoNumber of largest tool-output offenders to return (1..50).
daysNoOnly scan transcripts modified within the last N days (0 = all).
pathNoTranscript directory or .jsonl file path (defaults to ~/.claude/projects).
formatNoOutput representation ('json' or human-readable 'text').json
max_filesNoMaximum number of newest transcript files to scan (0 = unlimited).
idle_secondsNoIdle gap in seconds above which a subsequent cache rewrite counts as an idle cliff.
read_thresholdNoLine count above which an unwindowed Read call is counted as bloat.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, closed-world, and non-destructive, so the description's real contribution is the offline guarantee and the explicit claim that it never exposes file contents, shell commands, or full paths — genuine privacy/safety context not present in structured fields. It stops short of disclosing cost or runtime characteristics of a multi-file scan.

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 no filler — purpose first, then the three metrics, then the privacy constraint. Every clause adds information an agent can act on.

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

Completeness4/5

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

With no output schema and all parameters optional/defaulted, the description does a solid job of framing what the report contains (quantified metrics plus top offenders). It could be stronger by hinting at the shape of the result, but the format parameter and the enumerated metrics give adequate orientation for a 7-parameter read-only tool.

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 all seven parameters are already documented in the schema; the description only restates two default thresholds (350 lines, 5 minutes) and the notion of 'largest' offenders. Baseline 3 is appropriate since the schema carries the parameter burden.

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?

States a specific verb ('Run a ... diagnostic') against a specific resource ('local Claude Code JSONL transcripts') and enumerates the three metrics it quantifies: unwindowed reads, cache idle cliffs, and largest tool-output offenders. An agent knows exactly what this produces and it is clearly distinct from the sanitization/quarantine siblings.

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

Usage Guidelines3/5

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

Usage is implied by the nature of the tool (an audit/diagnostic you run on transcripts), but there is no explicit when-to-use, when-not-to-use, or named alternative. It also does not state prerequisites such as needing a populated ~/.claude/projects directory before calling.

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