lcc (Local Context Compiler)
The lcc MCP server lets coding agents compact context locally, keep or recover exact removed content, and audit why context was kept or dropped.
compact: Drop context blocks irrelevant to an objective/question, with offlinemechanicalby default or optional providers.compact_transcript: Compact Claude Code-style session transcripts by pairing tool calls/results and dropping spent pairs while keeping retained messages verbatim; supportsauto,specialist-v3, andrulesmodes includinglossless,recoverable, andstashed.recall: Recover tool outputs removed bystashedmode byte-for-byte from the local stash, optionally by line range.inspect: Run read-only diagnostics on text for tokens, structure, duplication, cleanup projection, and recommendations.prepare: Do inspect-first deterministic prompt preparation without summarizing or paraphrasing.explain: Explain a compaction report, showing why each block was kept, trimmed, or dropped.intake: Triage raw prompt input for readiness, intent, clarifying questions, assumptions, and a compiled prompt.Default operation is local/offline and fail-safe: failures keep content; every pass can produce an auditable report.
lcc — Local Context Compiler
Compact coding-agent context without summarizing it away. lcc cuts what the model does not need, keeps everything else byte for byte, and writes a receipt.
/compact vs lcc
Claude Code's /compact replaces your session with a summary written by a model. Summaries
drop the exact error, path or line the agent needs two turns later. lcc does the opposite: old
tool outputs leave the context but stay one recall away, and every user and assistant message
is kept as it was.
One real Claude Code session (193 messages, 75 tool calls) | tokens | user and assistant messages | removed tool outputs |
before | 57,083 | 43, as written | — |
| one summary | rewritten into the summary | gone |
lcc ( | 28,807 (−49.5%) | 43 / 43 byte for byte | 33, each one |
Measured with lcc measure-session (PyPI 1.2.0, offline, exact o200k_base token count;
re-run 2026-10-23). On main, whose stash note now states lines and size, the same session
gives 28,983 (−49.2%). That session is one of the best cases. Across all 299 of my long sessions (100+ messages each,
36.3 M tokens) the median cut was 21.8% (middle half 15% to 31%, best 65%), with 0 messages
lost (python benchmarks/research/long_sessions.py, 2026-10-23, main). These are all my sessions: run it on yours and post the result.
In a pre-registered test on 172 real requests (evidence), an agent answering
from the stashed context plus recall did as well as with the full context on file recall
(+0.006, 95% CI −0.023 to +0.034) with 36.6% fewer tokens. It called recall for 90% of the
questions about removed content. A /compact-style summary of the same sessions got 73% of exact values
right (our reimplementation of /compact, written by Opus); full and verbatim context got 98%.
Related MCP server: longhaul
Install
pip install "local-context-compiler[tiktoken]" # the CLI is `lcc`
lcc measure-session "$(ls -t ~/.claude/projects/*/*.jsonl | head -1)" # your latest sessionThe second line reads your most recent Claude Code session, runs every mode offline and prints counts only. Nothing is changed and nothing leaves the machine.
Claude Code plugin (replaces the /compact summary). Function hooks are early access, so
this needs Claude Code 2.1.274+ and the flag below:
export CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1
claude plugin marketplace add lucasmartins-ai/lcc
claude plugin install lcc@lcc --config provider=rules --config rulesMode=stashedAllow mcp__plugin_lcc_lcc__recall so the agent can get removed outputs back. When a pass
fails or removes too little, the plugin hands over to the built-in summary and says so in a
toast. Details: Claude Code guide.
MCP (Claude Code, Cursor, Claude Desktop, any stdio client):
{"mcpServers": {"lcc": {"command": "lcc", "args": ["mcp"]}}}Tools: compact, compact_transcript, recall, inspect, prepare, explain, intake
(MCP guide).
CLI, on a session file or any document:
lcc compact ~/.claude/projects/<project>/<session>.jsonl -q "finish the parser fix" \
--mode tool-calls --provider rules --rules-mode stashed -o compacted.json -r report.json
lcc recall <id> # a removed output, hash-checked
lcc compact notes.md -q "what is wrong with the booking flow?" \
--provider mechanical -o compacted.md -r report.json
lcc explain report.json --source notes.md # why each block was kept or droppedSend us your numbers
lcc measure-session ~/.claude/projects/<project>/<session>.jsonl --markdown
# Codex CLI rollouts are auto-detected from their session_meta record:
lcc measure-session /path/to/rollout.jsonl --markdown
# or a whole project directory: per-mode median and p90 reduction over its sessions
lcc measure-session ~/.claude/projects/<project>/ --markdownIt runs every mode on one of your sessions, offline, and prints counts only: messages, tool
calls, tokens before and after, messages kept, time. No text, path or tool output. For exact
counts, install the tiktoken extra and cache its tokenizer once (lcc itself never downloads):
python -c "import tiktoken; tiktoken.get_encoding('o200k_base')". Otherwise the report says
approximate and why. Paste it in
Discussions → Results.
Add --input-map to see where the session's billed input goes instead: cache reads and
writes, and the share taken by tool results, tool-call inputs, injected instructions and the
fixed system prompt and tool schemas (counts only, from the usage records in the file).
Already compacting with lcc? lcc share-stats turns your local reports into the same kind of
counts-only summary (SHARE_STATS.md), or use the
results issue form.
Every number from someone other than me makes the claims above less mine and more true.
Why lcc
Verbatim. Kept spans are byte-identical to the source. Nothing is summarized or rewritten.
Recoverable.
stashedmoves removed outputs to a local content-addressed store (~/.cache/lcc/stash);recallre-hashes on read. The placeholder,[removed: 120 lines, 4.3 KB · lcc recall <id>], states lines and size, not tokens, so it is identical on every machine.Auditable. Every pass writes a JSON report;
lcc explaingives the reason for every drop.Local. The default judges run on your CPU in plain Python. No API key, no network.
Providers
Provider | Runs | When it is used | Report says |
| local, CPU | default ( |
|
| local, CPU |
|
|
| local, no model |
|
|
| remote (TypeSafe API) | opt-in: | semantic judgment or explicit degradation |
| local model | deprecated; runs only when named | named model and fallback state |
specialist-v3 details and limits: SPECIALIST.md. Rules modes:
TOOL_CALLS.md. Jev is an optional path you name explicitly
(--provider jev); it sends the objective and context blocks to the TypeSafe API, and
LCC_DISABLE_NETWORK=1 disables it. auto never picks it on its own: having a key is not
consent to send context off-machine, so plain text under auto stays on mechanical unless
you set LCC_AUTO_REMOTE=1. compact writes a relevance-compaction-1.2 report;
check provider_used and degraded before trusting the output.
Benchmarks
Real sessions (held-out, INFERIDO). In plain words: when a ranker has to drop part of a session, how often does it keep what the agent actually used next? 1.0 would be always. A one-shot final test on 193 items from 36 of the maintainer's sessions that started after the training cutoff. Retention AUC over drop budgets of 0–60% of candidate tokens:
ranker | recall AUC | all-kept AUC |
specialist-v3 | 0.899 | 0.434 |
mechanical | 0.829 | 0.238 |
recency | 0.818 | 0.306 |
bm25 | 0.803 | 0.270 |
random | 0.689 | 0.138 |
The labels are next-action evidence from one maintainer's Claude Code sessions, which favours v3's training target. The sessions are private; only aggregates are published (SPECIALIST.md).
Synthetic, reproducible (python benchmarks/run_judge_bench.py, about 20 s, no network).
Nine hand-written edge cases: supersession, contradiction, config change, exception rule,
pt/en mixed, prompt injection in a tool output, large git diff, old root cause, re-read.
raw ranking | specialist-v3 | mechanical | bm25 | recency |
cases with every must-keep block kept at a 30 / 50 / 70% cut (of 9) | 8 / 7 / 7 | 9 / 9 / 9 | 9 / 9 / 7 | 8 / 6 / 3 |
full pass, default settings | must-keep kept | 302 blocks | 1,138 blocks | peak RSS |
| 9/9 | 181 ms | 3.4 s | 71 MB |
| 9/9 | 2 ms | 16 ms | 55 MB |
These cases are lexically easy, so the lexical baselines do well; v3 misses the Portuguese case. Timings are from macOS arm64 under heavy machine load. Method, every arm and the limits: BENCHMARKS.md. Rules modes on real sessions: REAL_SESSION_BENCHMARKS.md.
Reduction depends on how much of a context is noise. Below a 25% gain, the report marks the pass as not worth it, and the Claude Code plugin keeps the built-in summary.
What it does not do
It does not check that a model will answer correctly. A structural
PASSis not an answer quality result.No RAG, embeddings or vector store.
Protection rules and bounded restoration reduce, but do not rule out, lost evidence; see the safety model.
specialist-v3was trained on Claude Code transcripts. Other agents and plain documents are out of distribution; plain text usesmechanicalunless you opt in to Jev.
Docs
Topic | Link |
Five-minute tour of the CLI | |
Claude Code plugin | |
MCP server | |
Tool-call compaction and rules modes | |
Aider chat history as input | |
The local ranker | |
Benchmarks | |
Python API ( | |
Architecture and decisions | |
Opt-in and deprecated providers | |
Research archive | |
Privacy |
Development
Python 3.11+.
python -m pip install -e '.[dev,tiktoken]'
pytest -q && ruff check . && mypy
npm test # Node API and hook tests
python benchmarks/run_judge_bench.py --check --out /tmp/judge-benchThe PyPI package named lcc is unrelated; this one is local-context-compiler.
Contributing: CONTRIBUTING.md. Security: SECURITY.md.
Changes: CHANGELOG.md.
License
MIT. The optional Laya integration carries Apache-2.0 attribution in NOTICE. Maintained by LookADev.
Available Tools
7 toolscompactB
Drop context blocks irrelevant to an objective. Default provider mechanical is fully offline (no key, no network); laya is offline semantic (needs the [laya] extra, else honest mechanical fallback); jev needs TYPESAFE_API_KEY. Fail-safe: failures keep content.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| provider | No | mechanical | |
| question | Yes | ||
| threshold | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does real work: it discloses that the default provider is fully offline (no key, no network), that 'auto'/'laya' semantics differ, that jev requires TYPESAFE_API_KEY, and that failures are fail-safe (content is kept). The dependency and key requirements are exactly the behavioral context an agent cannot get from the schema. It stops short of describing output format or what 'irrelevant' means operationally.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core action is front-loaded in the first sentence, followed by compact provider notes. The semicolon-separated provider clauses are dense but readable, and no sentence is wasted, though the provider detail could be tightened.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 4-parameter tool with no annotations, no output schema, and zero schema description coverage, the description covers provider selection and failure behavior well but omits any explanation of the required text/question semantics or the threshold's effect on filtering. Adequate but incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 4 parameters, so the description must compensate. It explains the provider enum options well (mechanical/laya/jev and their requirements), but says nothing about 'text', 'question', or the 'threshold' number and its 0.4 default, leaving half the parameters undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'Drop context blocks irrelevant to an objective,' which tells the agent this is a filtering/compaction operation keyed to a question. It does not, however, distinguish itself from the sibling compact_transcript, so an agent must guess which compaction tool applies.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description never states when to use this tool versus compact_transcript or the other siblings, nor any preconditions for invoking it. The provider paragraph explains operational modes but is not usage-routing guidance, leaving selection entirely to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compact_transcriptA
Tool-call compaction for a session transcript: pairs each tool call with its result, pins the first and newest messages, and drops the pairs a semantic judge says are spent — kept messages stay verbatim, so nothing is summarized. Default 'auto' is the local specialist-v3 ranker (offline, no key); 'jev' is remote and needs TYPESAFE_API_KEY. Every failure keeps the call.
| Name | Required | Description | Default |
|---|---|---|---|
| trigger | No | Request-log label only: 'idle' for the plugin's idle stash. | |
| messages | Yes | Messages with role/text and toolUses/toolResults blocks (Claude Code hook shape) or tool_calls/tool_results. | |
| provider | No | 'auto' (default) and 'specialist-v3' use the local CPU ranker (no key, no network; ranks, does not judge). 'jev' is the remote TypeSafe System 1, needs TYPESAFE_API_KEY, and runs only when named. 'laya' is DEPRECATED (local, needs the [laya] extra) and runs only when named. 'rules' is an offline deterministic policy (no key, no model); see rules_mode. | auto |
| question | Yes | ||
| jev_model | No | jev-latest | |
| threshold | No | ||
| disk_check | No | ||
| laya_model | No | ||
| ref_blocks | No | ref_unchanged down to the block: a changed message comes back as {'ref': <input index>, 'toolUses': [<kept call index>...], 'toolResults': [<kept result index> | {'ref', 'tool_use_id', 'text', 'head'?, 'tail'?}...]}, a replaced result being original[:head] + text + original[-tail:] (UTF-16 units). | |
| rules_mode | No | Only for provider 'rules'. 'lossless' replaces a tool result with a pointer only when its text is kept verbatim in a later result, and verifies it. 'recoverable' also replaces old file reads (of files not written later) and read-only allowlisted command outputs with a re-read/re-run pointer, and verifies it. 'stashed' removes what 'lossy' drops or trims and 'recoverable' replaces, after saving the exact bytes to a local stash; the pointer names a 'recall' id. 'lossy' is EXPERIMENTAL (trims and drops outputs; failed blind audits v0.4 and v0.5). | lossless |
| max_workers | No | ||
| min_reduction | No | ||
| ref_unchanged | No | Return each message the pass left unchanged as {'ref': <input index>} and leave per-call decisions out, for size-capped callers. | |
| workspace_root | No | rules_mode 'recoverable' only: the session's working directory. When set (and disk_check on), the disk decides file pointers: a read is replaced iff the file inside it (or its own directory) currently holds exactly the removed content, even after later writes. | |
| idle_gap_bucket | No | Request-log label only: the idle gap bucket, e.g. '1h-2h'. | |
| preserve_recent | No | ||
| trim_head_chars | No | ||
| max_state_tokens | No | ||
| max_request_tokens | No | ||
| allow_command_pointers | No | rules_mode 'recoverable' only: also replace allowlisted read-only command outputs with a re-run pointer. Off by default. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and discloses important behavior: kept messages stay verbatim, nothing is summarized, failures preserve the call, and remote `jev` requires `TYPESAFE_API_KEY`. It still omits some behavioral details, such as side effects beyond compaction and return-shape expectations, but overall it is informative.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is dense but front-loaded, beginning with the core compaction behavior before provider and failure semantics. Most sentences earn their place, though the single-paragraph style makes it slightly harder to scan for a 20-parameter tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex 20-parameter tool with no annotations and no output schema, the description covers the main modes and important caveats well. However, it leaves several parameters and the general return shape under-explained, so an agent would still need to inspect the schema for full invocation confidence.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 45%, so the description must compensate. It does add useful meaning for `provider`, `rules_mode`, `ref_blocks`, `ref_unchanged`, `workspace_root`, and `allow_command_pointers`, but leaves many parameters (e.g., `threshold`, `preserve_recent`, `max_state_tokens`, `max_request_tokens`) unexplained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific operation on a specific resource: tool-call compaction for a session transcript, with concrete mechanics (pairing calls/results, pinning messages, dropping spent pairs). It is clear enough to distinguish from a generic `compact` tool, though it does not explicitly name any sibling alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains provider selection and defaults, which is useful operational guidance, but it does not say when to use `compact_transcript` instead of siblings such as `compact`, `inspect`, or `prepare`. Usage is implied by the tool name and transcript-specific behavior rather than explicitly framed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
explainB
Explain a relevance-compaction report (as produced by compact): why every block was kept, trimmed, or dropped. Never re-runs, never touches the network.
| Name | Required | Description | Default |
|---|---|---|---|
| only | No | ||
| limit | No | ||
| report | Yes | ||
| source_text | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden. It usefully discloses two non-obvious traits — it never re-runs compaction and never touches the network (pure, side-effect-free, offline) — but says nothing about permissions, error behavior, or cost, so the safety profile is only partially covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tightly written sentences with the purpose front-loaded and no filler. Every clause earns its place, though the second sentence reads as a behavioral caveat rather than structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a four-parameter tool with a nested required object and no annotations or output schema, the description adequately conveys what the tool returns (per-block keep/trim/drop rationale) but leaves the parameters and any validation/failure behavior unexplained. The core purpose is covered; the callable specifics are not.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across four parameters (report, only, limit, source_text), so the description must compensate and largely does not. The phrase 'kept, trimmed, or dropped' loosely echoes the keep/trim/drop enum on `only`, but limit, source_text, and the shape of the required nested `report` object are never addressed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('explain') and resource (a relevance-compaction report), and ties itself to the sibling tool that produces the report ('as produced by compact'). It distinguishes itself from compact by clarifying it does not re-run, though it does not carve out territory against other read-flavored siblings like inspect or recall.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage ('a report ... as produced by compact') but gives no explicit when/when-not or a named alternative to prefer or avoid. The 'Never re-runs' clause hints at the boundary versus compact without stating the selection rule directly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inspectA
Read-only diagnostic inspection of a text: tokens, structure, duplication, cleanup projection, and recommendation. Offline.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose two meaningful traits: 'Read-only' (no mutation) and 'Offline' (no network dependency). It says nothing about determinism, input size limits, cost, or what the returned recommendation looks like, so a 3 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single dense sentence that front-loads the read-only nature and then lists the report contents in order. Every clause carries information; the only minor cost is the telegraphic 'Offline.' fragment at the end.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, and the description correctly compensates by enumerating the returned facets (tokens, structure, duplication, cleanup projection, recommendation). Combined with the read-only/offline disclosure, an agent knows enough to invoke it correctly, though the relationship to the cleanup siblings remains unstated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
One parameter ('text') at 0% schema description coverage, so the schema adds nothing; the description compensates only by saying it inspects 'a text', which is obvious from the parameter name. No format, length, or encoding expectations are given, so it meets the minimum but no more.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (diagnostic inspection) and resource (a text), then enumerates exactly what the inspection reports: tokens, structure, duplication, cleanup projection, recommendation. It does not name a sibling to contrast with, but the diagnostic/read-only framing implicitly separates it from mutating siblings like compact or prepare.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'diagnostic inspection ... cleanup projection, and recommendation' implies this is the pre-flight check to run before a cleanup/compaction tool, but the description never states when to use it versus compact, compact_transcript, or prepare, nor any exclusions. Usage is inferable but not spelled out.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
intakeC
Intake triage for raw prompt input: readiness, intent, clarifying questions, assumptions, and a compiled prompt. Offline by default.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| question | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It does disclose one real behavioral trait (offline by default, i.e. no network dependency) and lists the categories of output produced, which is useful since there is no output schema. But it never says how to leave offline mode, whether the call is side-effect free, or whether it is deterministic.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight clauses with no filler; the operation and its output list are front-loaded. The trailing 'Offline by default.' fragment is compact but slightly disconnected from the main clause.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 2-parameter tool with no output schema and no annotations, the description should at minimum clarify the inputs and what 'readiness'/'intent'/'compiled prompt' mean. Listing output categories helps, but the undocumented question parameter and unelaborated output names leave real gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description never mentions either parameter. 'Raw prompt input' only loosely implies the required text field, and the optional question parameter (default "") is entirely undocumented in both description and schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Names a specific operation (intake triage) on a specific resource (raw prompt input) and enumerates the outputs it produces: readiness, intent, clarifying questions, assumptions, compiled prompt. It does not, however, differentiate itself from siblings like prepare, compact, or inspect, so an agent must infer the boundary.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no statement of when to use this tool versus prepare/inspect/compact, no prerequisites, and no when-not-to-use guidance. 'Offline by default' hints at a mode but does not say how or when to select a different one.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
prepareC
Inspect-first deterministic prompt preparation: runs inspection, then lexical selection + safe optimization only when recommended. Never summarizes or paraphrases. Offline.
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| question | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It does disclose real traits: deterministic, offline (no network), and it never summarizes or paraphrases, which is a meaningful negative constraint. It does not say whether anything is mutated, whether output is persisted, or what the response contains, so significant gaps remain.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short clauses, front-loaded with the inspect-first concept and the key constraint ('never summarizes or paraphrases'). No padding or repetition, though the dense jargon costs some readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, no annotations, and 0% parameter coverage, so the description must do more work than it does. It omits what the tool returns, what `question` is for, and how an agent knows whether optimization was 'recommended' — an agent could not call this correctly and predict the result from the definition alone.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for two parameters. The description's mention of prompt preparation loosely implies `text` is the prompt, but it says nothing at all about `text` format or the `question` parameter, leaving half the interface completely undocumented in both schema and prose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a recognizable activity (prompt preparation) and gives a rough pipeline: inspection, then lexical selection plus 'safe optimization' only when recommended. However, 'lexical selection' and 'safe optimization' are undefined jargon, and the name 'prepare' is generic enough that an agent cannot confidently distinguish this from sibling tools like compact or intake without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'only when recommended' gestures at a precondition but never says who recommends it or how an agent learns the recommendation. There is no explicit when-to-use or when-not-to-use guidance, and none of the siblings (compact, compact_transcript, inspect, intake, recall, explain) are named as alternatives, even though 'runs inspection' overlaps with the sibling `inspect`.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
recallA
Return a tool output that compact_transcript (rules_mode 'stashed') replaced with '[removed: N tokens · lcc recall ]'. The bytes are re-hashed on read, so the text is exactly what was removed. Offline, local stash only.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The hex id from the pointer. | |
| lines | No | Optional 1-based range 'a-b'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses the exactness guarantee (bytes re-hashed on read, so text is exactly what was removed) and the operating constraint (offline, local stash only). It omits error behavior for a missing, expired, or malformed id, which is a meaningful gap for a lookup tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the action before the mechanism and the constraint. Every clause is informative, though the first sentence is dense and jargon-heavy, which slightly reduces scannability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter, no-output-schema, no-annotation retrieval tool, the description covers what is returned and the key constraints, which is enough for correct invocation. Missing error/expiry handling keeps it from being fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents 'id' (hex id from the pointer) and 'lines' (1-based range 'a-b'). The description adds only indirect context by referencing 'the pointer', and says nothing about what happens when 'lines' is supplied or whether it truncates output. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific action (return a previously removed tool output) and ties it to the exact artifact being reversed, including the placeholder marker 'lcc recall <id>'. It names the sibling compact_transcript and its rules_mode 'stashed', which helps distinguish it from compact/compact_transcript. It stops short of a plain 'retrieve contents stashed by X' framing, but an agent can identify it without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description embeds the trigger condition: use this when you encounter '[removed: N tokens · lcc recall <id>]' placeholder text. That is clear context for invocation. It does not explicitly contrast with alternatives like inspect or explain, and gives no exclusions beyond the offline/local-only note.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
- First observed
compact - First observed
compact_transcript - First observed
explain - First observed
inspect - First observed
intake - First observed
prepare - First observed
recall
TDQS
Scored across 7 tools
Each tool has a distinct role in a coherent pipeline (compact for context blocks, compact_transcript for session transcripts, inspect/prepare/explain for diagnostics, recall for stash retrieval, intake for triage). The main risk is compact vs compact_transcript and inspect vs prepare, which overlap conceptually, but the descriptions clearly delineate scope and inputs.
All tools use a consistent lowercase verb pattern (compact, inspect, prepare, explain, recall, intake), with snake_case only for the compound compact_transcript. No mixed conventions or vague naming.
Seven tools is well-scoped for a context compiler, and each tool maps to a distinct stage (compaction, diagnostics, retrieval, intake) with no redundant entries.
The surface covers the core lifecycle: intake, inspection, preparation, compaction, explanation, and retrieval of stashed content. Minor gaps exist (e.g. no explicit way to list or enumerate stashed items before recalling, or a config/status tool), but core workflows are covered.
Maintenance
Related MCP Connectors
Compress coding-agent context ~64%. Hosted Neural Keep MCP for Cursor/Claude/Codex.
Deterministic AI agent microtools, no accounts/API keys. fetch_extract: 98% token cut. 47 tools.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Local-first long-term memory for AI agents, with byte-recomputable signed verification receipts.
Related MCP Servers
- AlicenseBqualityDmaintenanceBrings Claude Code's context compaction to any MCP host, enabling agents to gauge context pressure, summarize history, re-hydrate files, and persist rules across session boundaries.19MIT
- AlicenseAqualityBmaintenanceEnables local LLM chat sessions to continue indefinitely by automatically compacting context and storing permanent memory on disk, with recall across all past sessions.41MIT
- AlicenseNot gradedqualityBmaintenanceProvides deterministic context compaction and safety gating for AI agents, preserving original messages verbatim while dropping irrelevant ones and flagging destructive commands.2MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible developer environments to shrink verbose tool outputs—test logs, git diffs, directory listings, and file dumps—before they reach the context window, preserving compiler errors, failure signatures, and decisive anchors. It runs either as direct callable tools or as a transparent proxy wrapping other MCP servers such as filesystem, git, or terminal providers.1MIT