Skip to main content
Glama

Delete File

delete
Destructive

Permanently remove files, directories, or symlinks by exact path; supports recursive deletion and ignoring non-existent paths.

Instructions

Permanently delete files, directories, or symlinks, like rm or rm -r. Paths are exact; globs are not expanded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesPaths to delete (max 1000); accepts files, directories, or symlinks
recursiveNoDelete directory contents recursively (required for non-empty directories)
ignoreIfNotExistsNoSilently succeed if a path does not exist instead of returning an error

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.4.1
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv2.1.5
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "results": {
      -      "description": "Per-path results ordered to match the input paths",
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "error": {
      -            "additionalProperties": false,
      -            "description": "Error details; present on failure",
      -            "properties": {
      -              "code": {
      -                "type": "string"
      -              },
      -              "message": {
      -                "type": "string"
      -              },
      -              "path": {
      -                "type": "string"
      -              },
      -              "suggestion": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "code",
      -              "message"
      -            ],
      -            "type": "object"
      -          },
      -          "path": {
      -            "description": "Requested path",
      -            "type": "string"
      -          },
      -          "value": {
      -            "additionalProperties": false,
      -            "description": "Delete outcome; present on success",
      -            "properties": {
      -              "deleted": {
      -                "description": "True when the path was removed; false when the user chose Skip",
      -                "type": "boolean"
      -              }
      -            },
      -            "required": [
      -              "deleted"
      -            ],
      -            "type": "object"
      -          }
      -        },
      -        "required": [
      -          "path"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "summary": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "failed": {
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "succeeded": {
      -          "minimum": 0,
      -          "type": "integer"
      -        },
      -        "total": {
      -          "minimum": 0,
      -          "type": "integer"
      -        }
      -      },
      -      "required": [
      -        "total",
      -        "succeeded",
      -        "failed"
      -      ],
      -      "type": "object"
      -    }
      -  },
      -  "required": [
      -    "results",
      -    "summary"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. Addedv2.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false. The description adds meaningful behavior beyond that: deletion is permanent, applies to files/directories/symlinks, and uses exact path matching. This enriches rather than contradicts the annotation profile.

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

Conciseness5/5

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

Two compact sentences with no filler. The core purpose is front-loaded, and the glob caveat is a single high-value clarification that prevents misuse.

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

Completeness4/5

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

For a destructive tool, the description covers permanence, target types, recursion analogy, and path-matching behavior. Parameters and destructive nature are already handled by the schema and annotations, so nothing critical is missing for an agent to call it correctly.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents all three parameters in detail. The description adds only a high-level rm/rm -r analogy and an exact-paths caveat, which is marginal but not required for parameter understanding.

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?

States a specific verb and resource set: 'Permanently delete files, directories, or symlinks.' The rm/rm -r analogy clarifies expected semantics and distinguishes this destructive tool from sibling read/write/edit/move operations.

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

Usage Guidelines4/5

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

Gives clear context for when to use—permanent deletion of paths—and adds a useful constraint: paths are exact and globs are not expanded. It does not name explicit alternatives, but no sibling provides a delete operation, so the usage context is sufficient.

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