Skip to main content
Glama
GeminiDesk MCP
by LZ7TOP

Delete File or Directory

fs_delete

Deletes a specified file or folder; set recursive=true to remove all contents in non-empty directories and force=true to ignore missing paths.

Instructions

删除指定文件或文件夹(删除非空文件夹需设置 recursive=true)。

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": "fs_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes要删除的文件或文件夹路径
forceNo路径不存在时是否忽略报错
recursiveNo删除文件夹时是否递归删除内部全部内容

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden for a destructive operation. It never states that deletion is permanent/irreversible, what happens on permission failure, or what the `force` flag does when the path is missing — all of which an agent needs before invoking a delete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the core operation first and the key caveat in parentheses. No filler, though the parenthetical-only structure means the destructive caveat is easy to skim past.

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

Completeness3/5

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

For a 3-parameter tool with fully documented schema and no output schema, the description covers the main operational gotcha (recursive deletion). It is nonetheless thin for an irreversible mutation with zero annotation coverage, missing any warning about permanence or side effects.

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 all three parameters are already documented in the schema; that sets the baseline at 3. The description adds a small amount by linking recursive=true to the non-empty-folder case, but says nothing about `force` beyond what the schema already states.

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?

States a specific verb (删除) and resource (文件或文件夹), and distinguishes the file vs. directory cases. It does not differentiate itself from siblings such as fs_move_or_rename or fs_trash-style alternatives, but the operation itself is unambiguous.

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?

The parenthetical gives one concrete usage condition — set recursive=true when the target folder is non-empty — which is genuinely actionable. However, there is no guidance on when to prefer this over related tools, nor any prerequisite/permission context, so usage is only partially covered.

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