Skip to main content
Glama

delete_file

Remove a file or directory on a remote Linux server via SSH, with optional recursive deletion.

Instructions

Delete a file or directory on the remote server.

Args: path: Absolute path to delete. recursive: If True, delete directory and all its contents (use with caution). host_name: Named host from SSH_HOSTS config; uses default host if omitted.

Returns: Success message or error details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
host_nameNo
recursiveNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the recursive delete behavior with a cautionary note, describes host_name default handling, and mentions return values. It could additionally note irreversibility, but the 'delete' verb and recursive caution cover the core safety aspects.

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 efficiently structured with an Args list and a Returns line, using concise bullet-like formatting. Every sentence contributes to understanding the tool's behavior, with no unnecessary verbiage.

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?

Given the tool's simplicity (3 parameters, no annotations, and an output schema), the description fully covers the necessary context: what is deleted, how recursion works, host selection, and the nature of the return value. The output schema covers return format details, so the description need not elaborate further.

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?

The input schema has 0% description coverage, so the description must fully compensate. It thoroughly explains each parameter: path as an absolute path, recursive with caution about deleting contents, and host_name with its default behavior. This adds significant value beyond the bare schema.

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 explicitly states 'Delete a file or directory on the remote server', using a specific verb and resource. This clearly distinguishes it from sibling tools like write_file or execute_command, and there is no other delete tool among the siblings.

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 context is clear: this tool is for deleting files or directories. However, it does not explicitly mention when to prefer this tool over alternatives (e.g., execute_command for complex deletion scenarios) or any exclusions. The purpose is self-evident, so it earns a 4 rather than a 3.

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/zhouxiangjing/mcp-ssh'

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