Skip to main content
Glama

replay_corpus

Reproduce compression mechanisms across filtered captured sessions to report aggregate real tool-result token reduction. Strictly read-only.

Instructions

Reproduce the shipped compression mechanisms across a filtered corpus of captured sessions and report the aggregate real tool-result token reduction. Strictly read-only.

days is an exact rolling ingestion window over the caller's widest authorized session scope (default 30): team leads include their teams, admins include their organization, and other callers follow org sharing settings. For source="codex", stored model names must start with gpt- or codex-. model_family/project/session_category further narrow the corpus. limit is the target fully eligible session count (max 100); Replay scans up to 4x that many recent session records, capped at 100, and stops when it reaches the target or exhausts the scan. Every result states its effective scope, sessions considered vs eligible, and why the rest were excluded.

min_turns/min_tool_calls override the turn-count and tool-call-count floors (default 5/5; PRD §6's documented floors are 10/10) — reported in the output's provenance.

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": "replay_corpus"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNo
limitNo
sourceNoall
projectNo
min_turnsNo
mechanismsNo
model_familyNo
min_tool_callsNo
session_categoryNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden and does it well: it declares read-only status, the exact scope-widening rule by role, the 4x/100-record scan cap, and that every result reports effective scope with exclusion reasons. It stops short of stating the cost or latency implied by scanning up to 400 session records.

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?

Purpose is front-loaded in one sentence, then parameters are addressed in a logical order with no filler. It is dense but a few clauses, such as the PRD §6 floor comparison, add authorial detail without changing how an agent calls the tool.

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?

For a nine-parameter tool with zero schema descriptions, the definition covers scope, eligibility, scanning limits and provenance reporting, and the output schema handles return values. The unexplained mechanisms array is the only substantive omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does for eight of nine parameters: days scope semantics, limit as target eligible count with a 100 cap and 4x scan, the gpt-/codex- constraint for source=codex, and the way project/model_family/session_category narrow the corpus. The mechanisms parameter is never explained at all, leaving a real gap.

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?

The opening sentence gives a specific verb and object: reproduce shipped compression mechanisms across a filtered corpus and report aggregate token reduction. 'Corpus' plus 'aggregate' makes clear this is multi-session rather than the single-session replay_session sibling. It never names a sibling explicitly, so sibling differentiation is only implied.

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?

The description explains scope resolution, eligibility floors and narrowing filters, which tells the agent how the tool behaves once chosen. It never states when to prefer replay_corpus over replay_session, replay_compare or replay_eligibility, so the routing decision is left to inference.

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