Skip to main content
Glama

ssh_delete

Delete a file or empty directory on a remote host via SFTP. Provide the absolute path. For recursive deletion, use ssh_exec with rm -rf.

Instructions

Delete a file or empty directory on a remote host via SFTP. Auto-detects the path type and calls the right SFTP op (unlink for files/symlinks, rmdir for empty dirs). Recursive directory delete is intentionally NOT supported -- for that, use ssh_exec with rm -rf explicitly so the destructive intent is visible in the tool trace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesSSH hostname or IP address
pathYesAbsolute path of the file or empty directory to delete. Must start with /.
portNoSSH port (default: 22)
usernameNoSSH username (default: current user)
credential_idNoAlias of an SSH password configured only on the MCP server (for example, ssh1 resolves to SSH_CREDENTIAL_SSH1). Never pass a real password here.
privateKeyPathNoPath to SSH private key
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It is transparent about the operation's side effects, auto-detection logic, the specific SFTP ops used (unlink/rmdir), and the non-recursive limitation. It stops short of disclosing permission requirements or exact failure behavior, but for a destructive tool it is unusually explicit about what happens and what does not.

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 sentences with no redundancy: the first states the core purpose, the second explains the mechanics in one clause, and the third gives the necessary alternative and rationale. The critical scoping constraint (non-recursive) is front-loaded and the rationale for the alternative is clearly articulated.

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 what the tool does, its limitations, and the recommended alternative, which is sufficient for an agent to decide when to call it. It does not describe the return value or failure output, but since the tool is simple and no output schema exists, this is a minor omission rather than a usability gap.

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 100%, so the schema fully documents all six parameters. The description adds no parameter-level detail beyond the schema, only reinforcing that the path refers to a file or empty directory and that deletion is non-recursive. This meets the baseline for schema-covered parameters without adding significant extra meaning.

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 states a precise verb ('Delete'), a specific resource ('a file or empty directory on a remote host via SFTP'), and defines the scope of supported targets (files, symlinks, empty dirs). It also distinguishes itself from ssh_exec for recursive deletes, preventing confusion among the many SSH siblings.

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

Usage Guidelines5/5

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

Explicitly states when NOT to use this tool ('Recursive directory delete is intentionally NOT supported') and names the exact alternative to use instead ('use ssh_exec with rm -rf explicitly'). This gives the agent both a clear trigger condition and a fallback path with no 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/txcxgzs/ssh-mcp'

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