Medium Risk

compress_ai_readme

Compress an AI_README.md file using deterministic filler-language removal (no LLM call). WHEN TO CALL: - validate_ai_readmes reports 'filler-language' warnings. - validate_ai_readmes reports token count is too high. - After init_ai_readme, to tighten up generated content. - Any time you want to r...

How to control compress_ai_readme ↓

What compress_ai_readme does on Ai Readme

AI agents use compress_ai_readme to create or update resources in Ai Readme — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Ai Readme environment.

ParameterTypeRequiredDescription
dryRun boolean If true, return compression preview without writing the file (default: false)
readmePath string Yes Absolute path to the AI_README.md file to compress

Parameters from the server's own tool schema.

Medium Risk

Why compress_ai_readme needs a policy

This tool modifies existing AI_README.md files by performing text transformations (removing filler words, shortening phrases). It rewrites file content, making it a Write operation. While the changes are described as 'deterministic' and aimed at reducing token count without losing information, the file is still being altered.

From the tool's definition Compress an AI_README.md file using deterministic filler-language removal — modifies the content of an existing file by removing/replacing text

Documented attack patterns abuse exactly the kind of access compress_ai_readme gives an agent:

How to control compress_ai_readme

PolicyLayer is an MCP gateway — it sits between your AI agents and Ai Readme, and nothing reaches the server without passing your rules. This is the rule we recommend for compress_ai_readme:

policy.json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "compress_ai_readme": {
      "limits": [
        {
          "counter": "compress_ai_readme_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}

compress_ai_readme stays usable, but capped — an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.

  1. Create a free account and register Ai Readme — nothing to install.
  2. Add this policy — paste it, or build it visually.
  3. Point your MCP client (Claude, Cursor, anything) at your gateway URL.
LIMIT THIS TOOL →

Free to start. No card required.

Related tools and policies

Go deeper

Questions about compress_ai_readme

What does the compress_ai_readme tool do? +

Compress an AI_README.md file using deterministic filler-language removal (no LLM call). WHEN TO CALL: - validate_ai_readmes reports 'filler-language' warnings. - validate_ai_readmes reports token count is too high. - After init_ai_readme, to tighten up generated content. - Any time you want to reduce AI_README token footprint without losing information. WHAT IT DOES (pure text transforms, deterministic): - Removes filler: just, really, basically, actually, simply, essentially - Shortens verbose phrases: 'in order to' → 'to', 'utilize' → 'use', 'make sure to' → 'ensure' - Removes hedging: 'you should', 'remember to', 'it might be worth', 'please note that' - Removes fluff connectives: furthermore, additionally, in addition, moreover - NEVER modifies: code blocks ( fenced), inline code (...), headings, file paths, URLs, commands - Output may contain sentence fragments — this is intentional. Fragments are valid token-efficient format. USE dryRun:true FIRST to preview changes before writing. It is categorised as a Write tool in the Ai Readme MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.

What parameters does compress_ai_readme accept? +

compress_ai_readme accepts 2 parameters: dryRun, readmePath. Required: readmePath. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on compress_ai_readme? +

Register the Ai Readme MCP server in PolicyLayer and add a rule for compress_ai_readme: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Ai Readme. Nothing to install.

What risk level is compress_ai_readme? +

compress_ai_readme is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit compress_ai_readme? +

Yes. Add a rate_limit block to the compress_ai_readme rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block compress_ai_readme completely? +

Set action: deny in the PolicyLayer policy for compress_ai_readme. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides compress_ai_readme? +

compress_ai_readme is provided by the Ai Readme MCP server (ai-readme-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Enforce policy on every Ai Readme tool call.

Start from Ai Readme, add the rest of your stack, and see everything your agents can call. Then put policy on all of it.

Free to start. No card required.

6 Ai Readme tools catalogued and risk-classified — across an index of 43,000+ MCP servers.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.