New advertisers: 50% off your first month with code FIRSTMONTHSee slots
builditwithgk avatar

Whittle Mcp

builditwithgk/whittle-mcp

Trims test logs, JSON, diffs, logs and OpenAPI specs for agents, and reports tokens saved.

tools
7
transport
STDIO
last updated
Nov 21, 2026
View on GitHub

What it does

  • Reads and shrinks output with trim_tests, trim_log, mask_json, trim_diff, and slice_openapi, keeping failing assertions and error lines intact
  • Recovers omitted content with expand by line range or JSON path, and tallies savings with report
  • Runs locally as an MCP server or as a shell pipe, with no account, API key, or network call required
  • Designed for coding agents that repeatedly re-read long test runs, stack traces, large JSON responses, or API specs

Tools

7 tools

Public tool metadata for what this MCP can expose to an agent.

trim_testspytest, unittest, jest, mocha, RSpec, TAP, go test, cargo test: failures with their assertions and locations, plus the summary. Any other format is returned unchanged

pytest, unittest, jest, mocha, RSpec, TAP, go test, cargo test: failures with their assertions and locations, plus the summary. Any other format is returned unchanged

No parameter schema in public metadata yet.

trim_logadjacent repeats collapsed and counted, long tracebacks keep their last frames, the first three errors of each shape stay (and the rest are summarised as "N more like ...")

adjacent repeats collapsed and counted, long tracebacks keep their last frames, the first three errors of each shape stay (and the rest are summarised as "N more like ...")

No parameter schema in public metadata yet.

mask_jsonobject keys stay; arrays show their first three items plus up to three later ones that add a new key or a new kind of value; long strings are shortened; the result is still valid JSON

object keys stay; arrays show their first three items plus up to three later ones that add a new key or a new kind of value; long strings are shortened; the result is still valid JSON

No parameter schema in public metadata yet.

trim_difflockfiles, generated or vendored files and whitespace-only changes collapse; long runs of unchanged lines are cut

lockfiles, generated or vendored files and whitespace-only changes collapse; long runs of unchanged lines are cut

No parameter schema in public metadata yet.

slice_openapian index of operations, or only the operations you ask for plus the schemas they use

an index of operations, or only the operations you ask for plus the schemas they use

No parameter schema in public metadata yet.

expandreturns what a marker omitted, by line range or JSON path

returns what a marker omitted, by line range or JSON path

No parameter schema in public metadata yet.

reporttokens saved this session, net of anything re-expanded, and money saved at your prices

tokens saved this session, net of anything re-expanded, and money saved at your prices

No parameter schema in public metadata yet.

Readme

whittle-mcp

Trim what your agent reads, and measure what it kept.

Coding agents spend most of their tokens re-reading tool output: test runs, logs and stack traces, big JSON, diffs and API specs. Every result stays in the conversation and is re-sent on every later turn. whittle-mcp shrinks that output without losing the facts, and it proves what it kept.

  • Five trimmers: test output, logs, JSON, git diffs, OpenAPI documents.
  • Nothing is lost. What it removes is replaced by a short marker such as [... 312 lines omitted: whittle expand a1b2c3d4 lines=45-356 ...], and expand returns exactly that part on request.
  • Two ways to use it: an MCP server (uvx whittle-mcp) and a pipe for any shell (pytest 2>&1 | whittle tests).
  • Measured, not claimed: every trimmer is scored on how many tokens it saves and how many must-keep facts survive, on a public corpus. See docs/BENCHMARK.md.

Try it in your browser, nothing to install or send anywhere: https://huggingface.co/spaces/builditwithgk/whittle-mcp (paste a test log, JSON or diff and see what is kept).

Install and use


View the full README on GitHub

Details

Repository
github.com/builditwithgk/whittle-mcp
Website
huggingface.co/spaces/builditwithgk/whittle-mcp
Categories
Memory & Context, Testing & QA, Developer Tools
Package
whittle-mcp
Transport
STDIO
Registry
MCP registry, active

Similar to Whittle Mcp

More Memory & Context