Skip to main content
Glama

Delete File

delete_file

Deletes a file or directory on a Linux machine, with recursive removal allowed only when explicitly enabled by the caller.

Instructions

Delete a file or directory; recursive deletion must be explicit.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "delete_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
recursiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does add one genuinely useful behavioral fact beyond the schema: recursive deletion must be requested explicitly, implying the default fails or refuses on non-empty directories. It says nothing about permanence/irreversibility, required permissions, or what error conditions look like for a destructive operation.

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?

A single front-loaded sentence with no filler; the destructive scope and its constraint are stated immediately. Nothing could be removed without losing information.

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

Completeness2/5

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

For a destructive, irreversible tool with no annotations, no output schema, and 0% schema description coverage, this is thin. An agent cannot tell whether deletion is permanent, what permissions are needed, or how non-existent paths and non-empty directories are reported.

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 description coverage is 0%, so the description must compensate. It gives partial meaning to 'recursive' by framing it as an explicit opt-in for directory deletion, but leaves the 'path' parameter (absolute vs relative, symlink behavior) and the exact failure mode of omitted 'recursive' undocumented.

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

Purpose4/5

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

The description uses a specific verb (Delete) plus the resource (a file or directory), so there is no ambiguity about the operation. It implicitly distinguishes itself from siblings like write_file or move_file, but never names them or states the boundary explicitly.

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

Usage Guidelines3/5

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

Usage is only implied: the agent can infer this is the tool for removing files or directories, and the clause about recursive deletion signals the non-empty-directory case. There is no explicit when-not guidance, no mention of alternatives such as move_file for relocation, and no prerequisites stated.

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