Guide

Agents

The same tools over local or remote MCP and Pi and OMP and the AI SDK. What they take and refuse and what the model reads back

Same tools, every host

Four hosts, one set of executors. The MCP server, the Pi and OMP extensions and @agntn/compressions/ai all call src/tool-operations.ts. Same arguments, same checks, same text back. This site runs those executors too, so every tool dialog here shows exactly what a model reads.

ToolDoesArguments
compressions_compressCompress text or bytes, give base64 or hex backformat, input, inputFormat, dataFormat, options
compressions_decompressDecompress, show a window of the resultformat, data, dataFormat, outputFormat, offset, length, partial, options
compressions_identifyRank the formats some bytes decompress in, or peel themdata, dataFormat, peel, depth
compressions_infoThe list, or one format with its containers and optionsformat, optional

Compressed bytes travel as base64 by default. A model can't send raw bytes, and base64 is what it gets handed most of the time anyway.

What a model reads

A header line, then the value:

text
deflate (container gzip) → 12 bytes, as utf8 (os 255, members 1):
"hello world!"

outputFormat is auto by default. Readable text comes back quoted, anything else as hex. Ask for utf8, hex or base64 and you get that.

compressions_identify with peel: true lists the layers, outermost first, and hands over the bottom:

text
3 layers, outermost first:
1. bzip2 container bzip2, confidence 90: starts with its magic number; checksum matches; decodes to the last byte (level 9, blocks 1)
   88 bytes, hex fd377a585a000004e6d6b4460200210116000000742fe5a3…
2. lzma container xz, confidence 90: starts with its magic number; checksum matches; decodes to the last byte (check "crc64", blocks 1)
   32 bytes, hex 1f8b08000000000000ffcb48cdc9c95728cf2fca495104006dc2b4030c000000
3. deflate container gzip, confidence 100: starts with its magic number; checksum matches; decodes to the last byte; decompresses to readable text (os 255, members 1)
   12 bytes, text "hello world!"
Innermost, 12 bytes as base64:
aGVsbG8gd29ybGQh

Everything the next call needs is in the text. An MCP client sees nothing else. Pi, OMP and the AI SDK get structured details as well.

What they refuse

Every schema is closed. A misspelled argument is an error, not a quiet default. An option that exists, but not for this format or this direction, gets named instead of swallowed:

text
Ignored, deflate does not take here: level

A broken stream is a tool error with the reason and the offset. The session carries on, and partial: true shows what came out before the damage. The output stops at 64 MiB and one answer shows 16 KiB unless length asks for more, up to 1 MiB. Limits has the rest. Nothing gets written to disk, and over stdio there's no network to reach.

MCP

shell
compressions mcp
claude mcp add compressions --scope user -- npx -y @agntn/compressions mcp

Or in a client's config:

json
{
  "mcpServers": {
    "compressions": { "command": "npx", "args": ["-y", "@agntn/compressions", "mcp"] }
  }
}

stdio, every tool read-only and idempotent.

Remote MCP

No Node around, or no mood to install anything? This site serves the same four tools over Streamable HTTP, at https://compressions.agntn.dev/mcp. Any MCP client that takes a URL takes this one.

shell
claude mcp add --transport http compressions https://compressions.agntn.dev/mcp
json
{
  "mcpServers": {
    "compressions": { "type": "http", "url": "https://compressions.agntn.dev/mcp" }
  }
}

It's the Docus MCP server with the compression tools bolted on. Names, descriptions, schemas and executors all come from src/mcp.ts. A call gets the text compressions mcp would give, refusals included. Docus throws in two of its own. list-pages lists this site and get-page hands a page over as Markdown. So a model can read up on legacy LZ4 and then open one, without leaving the server.

The limits are smaller, though. A worker isolate gets 128 MB, and a 64 MiB bomb with its copies doesn't fit. Here input stops at 262,144 characters, output at 4 MiB, and one answer shows 256 KiB at most. The tool descriptions still say 64 MiB, because they're the same text as locally. The error names the limit that actually hit, output passes the limit of 4194304 bytes. Anything bigger goes through npx -y @agntn/compressions mcp.

And the obvious part: every argument travels to a Cloudflare worker. The site doesn't log or keep them. That's a promise, though, not something you can check from your side. A blob from a public puzzle is fine. Anything private stays on the local server.

Pi and OMP

shell
pi install npm:@agntn/compressions
omp install @agntn/compressions

Both extensions are declared in package.json and ship as source the host loads directly.

AI SDK

ts
import { generateText } from "ai";
import { compressionAiTools } from "@agntn/compressions/ai";

await generateText({
  model,
  tools: compressionAiTools,
  prompt: "What's inside H4sIAAAAAAAA/8tIzcnJVyjPL8pJUQQAbcK0AwwAAAA=?",
});

compressionAiTools holds all four under the same names. Each one is exported alone too, compressionsDecompressTool and friends, if you'd rather hand a model fewer.