Skip to main content
Glama
lucasmartins-ai

lcc (Local Context Compiler)

compact_transcript

Cut spent tool outputs from a session transcript: pairs each call with its result, pins first and newest messages, and keeps survivors verbatim so nothing is summarized. Offline ranker; failures keep calls.

Instructions

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.

Input Schema

NameRequiredDescriptionDefault
triggerNoRequest-log label only: 'idle' for the plugin's idle stash.
messagesYesMessages with role/text and toolUses/toolResults blocks (Claude Code hook shape) or tool_calls/tool_results.
providerNo'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
questionYes
jev_modelNojev-latest
thresholdNo
disk_checkNo
laya_modelNo
ref_blocksNoref_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_modeNoOnly 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_workersNo
min_reductionNo
ref_unchangedNoReturn each message the pass left unchanged as {'ref': <input index>} and leave per-call decisions out, for size-capped callers.
workspace_rootNorules_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_bucketNoRequest-log label only: the idle gap bucket, e.g. '1h-2h'.
preserve_recentNo
trim_head_charsNo
max_state_tokensNo
max_request_tokensNo
allow_command_pointersNorules_mode 'recoverable' only: also replace allowlisted read-only command outputs with a re-run pointer. Off by default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.