Skip to main content
Glama

delete_file

Delete a file or empty directory on a remote server. Safe mode restricts deletions to temporary directories and protects system directories.

Instructions

Delete a file or empty directory. This is a dangerous operation. In safe mode, only deletes in /tmp and /var/tmp are allowed. System directories are always protected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the file or directory to delete
serverNoServer alias (e.g., 'pi1', 'web-server'). Uses default server if not specified.
Behavior4/5

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

Without any annotations, the description effectively discloses the destructive nature, safe mode constraints, and protection of system directories. It does not specify error behavior for non-empty directories or required permissions, but the critical behavioral traits are covered.

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?

The description is extremely concise at three sentences with no redundant information. It front-loads the core action and then adds necessary safety warnings, making it easy for an AI agent to parse quickly.

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?

The description covers the tool's purpose and key safety contexts, but does not explain return values (no output schema) or error handling. It is sufficient for a straightforward destructive operation given the schema provides parameter details.

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?

The input schema already provides descriptions for both parameters (server and path) with 100% coverage. The description adds no new semantic meaning beyond restating the tool's purpose, so it does not enhance parameter understanding beyond the schema baseline.

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?

The description clearly states the tool deletes a file or empty directory, using a specific verb and resource. It distinguishes itself from sibling tools like read_file, rename_file, and copy_file by indicating a destructive operation, though it does not explicitly differentiate from other deletion tools like delete_user (which target different entities).

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?

The description provides explicit usage context by warning that the operation is dangerous and specifying safe mode restrictions (only /tmp, /var/tmp) and that system directories are always protected. However, it does not advise when not to use the tool (e.g., for non-empty directories) or mention alternatives, leaving some ambiguity.

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/gjenkins20/webmin-mcp-server'

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