Skip to main content
Glama

delete_file

Destructive

Permanently removes a file or directory, including recursive contents, while refusing the workspace root, linked trees, nested repositories, and protected files.

Instructions

Delete a file or directory (recursively). Irreversible. Refuses the workspace root, trees that contain links, nested repositories or protected files, and huge trees.

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, and the description goes further by stating irreversibility and enumerating the exact classes of targets that will be refused. That refusal list is behavior an agent cannot get from the annotations or schema and directly affects call success.

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?

Three short clauses, front-loaded with the action and recursion behavior, followed by the risk and the guardrails. No sentence is filler.

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?

An output schema exists, so return values need not be described, and the destructive/refusal behavior is well covered. The gap is the single input parameter's format, plus the error shape when a refusal fires, which matters for a one-shot irreversible operation.

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?

Only one parameter is present and schema coverage is 0% — the schema says nothing about what 'path' means. The description partially compensates by referencing 'the workspace root', implying paths are workspace-scoped, but it never states whether the path is relative or absolute, or how directories are denoted.

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 plus a scope qualifier ('recursively'), which cleanly separates it from siblings like move_path or create_directory. An agent knows immediately that this removes filesystem entries.

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?

It conveys preconditions (won't delete root, symlinked trees, nested repos, large trees) which implicitly routes the agent away from this tool in those cases, but it never names an alternative operation or says when a non-recursive or non-deleting approach is preferred. Usage is implied rather than prescribed.

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