Skip to main content
Glama

rm

Destructive

Remove files and directories with dry-run preview, recursive deletion, and sandbox protections. Destructive operation; deleted data cannot be recovered.

Instructions

Remove files or recursively delete directories with dry-run and safety protections. Destructive and irreversible: deleted data cannot be recovered. Use --dry_run to preview which files would be removed. Recursive directory removal requires --recursive. Sandbox checks prevent deletion outside the current working directory without explicit --allow_outside_cwd. Returns JSON with removed paths. Use to delete files and directories. Not for secure deletion — use 'shred' to overwrite before removal. Not for removing only empty directories — use 'rmdir'. See also 'rmdir', 'shred', 'unlink'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoIgnore missing files.
pathsYesPaths to remove.
dry_runNoReport operations without changing files.
recursiveNoRemove directories recursively.
allow_outside_cwdNoAllow recursive directory removal outside the current working directory.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already set destructiveHint=true, but description adds irreversibility warning, dry-run preview, recursive requirement, and sandbox checks. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with safety info front-loaded. Slightly verbose with multiple sentences, but every sentence adds value. Could be tightened without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema provided, so description compensates by stating 'Returns JSON with removed paths'. Covers safety, alternatives, and all key behaviors for a destructive tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%. Description adds context like dry_run preview behavior, recursive necessity, and allow_outside_cwd condition, but schema already describes each parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'remove files or recursively delete directories' with specific verb-resource pairing. Distinguishes from siblings by explicitly mentioning 'shred' and 'rmdir' as alternatives for other use cases.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use (delete files/directories) and when-not-to-use (secure deletion, empty directories). Mentions alternative tools 'shred' and 'rmdir' for those cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/caseSHY/AI-CLI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server