Measured file-read optimization

Get-Content can be smaller without becoming opaque.

Capsule recognizes only a narrow, safe form of PowerShell Get-Content or gc: one literal UTF-8 file, no pipeline, wildcard, variable, wait, range, or unknown switch. Everything else keeps the normal shell semantics.

Bounded replay result

ArmModel-visible outputReduction
Generic projector315,357 local token estimatesControl
Native path + verified fallback42,120 local token estimates86.64%
Unchanged-file replay2,814 tokens across 201 calls94.21% vs control subset

The bounded replay fixture retained exact recovery for every replayable case and recorded no regressions. Counts and payloads are intentionally summarized rather than publishing local replay-set details. These are local model-visible proxies, not provider billing or hidden reasoning telemetry.

Safety gates

Parse narrowly

Reject shell composition, variables, wildcards, non-UTF-8 encodings, ranges, waits, and unknown flags.

Verify content

Replay requires the same request and an unchanged SHA-256 source hash.

Never grow output

If the generic projector is shorter, the native path delegates back instead of increasing model-visible context.

Reproduce it

npm run benchmark:get-content
npm run benchmark:get-content:history

Read the implementation in mcp/get-content.cjs and the full A/B report in BENCHMARK.md.