Critical Risk →

clear_outputs

clear_outputs

How to control clear_outputs ↓

What clear_outputs does on Ast Editor

AI agents call clear_outputs to permanently remove resources in Ast Editor — typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.

Critical Risk

Why clear_outputs needs a policy

The tool name 'clear_outputs' strongly suggests it removes or wipes output content (e.g., cell outputs in a notebook context, given the sibling tool 'add_cell'). Clearing outputs is typically irreversible without version control. The description is empty, which lowers confidence, but the notebook context (add_cell sibling) and 'clear' semantics point to Destructive.

From the tool's definition Tool name 'clear_outputs' combined with server context of AST-based file editing; 'clear' implies irreversible removal of output data

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

How to control clear_outputs

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

policy.json
{
  "version": "1",
  "default": "deny",
  "hide": [
    "clear_outputs"
  ]
}

clear_outputs disappears from the agent's tool list entirely, and any attempt to call it is denied. The rest of the server keeps working.

  1. Create a free account and register Ast Editor — 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.
RESTRICT THIS TOOL →

Free to start. No card required.

Related tools and policies

Go deeper

Questions about clear_outputs

What does the clear_outputs tool do? +

clear_outputs. It is categorised as a Destructive tool in the Ast Editor MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.

How do I enforce a policy on clear_outputs? +

Register the Ast Editor MCP server in PolicyLayer and add a rule for clear_outputs: 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 Ast Editor. Nothing to install.

What risk level is clear_outputs? +

clear_outputs is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.

Can I rate-limit clear_outputs? +

Yes. Add a rate_limit block to the clear_outputs 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 clear_outputs completely? +

Set action: deny in the PolicyLayer policy for clear_outputs. 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 clear_outputs? +

clear_outputs is provided by the Ast Editor MCP server (kambleakash0/agent-skills). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Enforce policy on every Ast Editor tool call.

Start from Ast Editor, 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.

59 Ast Editor 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.