Skip to main content
Glama

rm

Destructive

Remove files or directories with dry-run preview and safety checks. Recursive deletion requires explicit flag; includes dry-run to preview changes.

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
allow_outside_cwdNoAllow recursive directory removal outside the current working directory.
dry_runNoReport operations without changing files.
forceNoIgnore missing files.
pathsYesPaths to remove.
recursiveNoRemove directories recursively.
Behavior5/5

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

Annotations indicate destructiveHint=true. Description elaborates on safety mechanisms (dry-run, recursive requirement, outside cwd check) and irreversibility, going beyond the annotation.

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?

Six sentences, each providing essential information. Slightly verbose in mentioning 'Returns JSON with removed paths' which is implicit, but overall well-structured and front-loaded.

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?

Covers safety, alternatives, return format, and prerequisites. Given high complexity of a destructive tool with five parameters, description is thorough and leaves no major gaps.

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

Parameters5/5

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

Schema coverage is 100%, but description adds value by explaining usage contexts for each parameter (e.g., 'Use --dry_run to preview', 'Recursive directory removal requires --recursive', 'Sandbox checks prevent deletion outside the current working directory without --allow_outside_cwd').

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?

Description starts with specific verb+resource ('Remove files or recursively delete directories') and includes safety protections. It distinguishes from siblings by naming 'shred' and 'rmdir'.

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?

Explicitly states when to use --dry_run, requires --recursive for directories, sandbox checks, and provides alternatives: 'shred' for secure deletion, 'rmdir' for empty directories, and 'unlink'.

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