Skip to main content
Glama

delete-file

Destructive

Force-deletes a single specified file only when it is strictly inside a required folder; refuses file lists, patterns, and folders. Use for removing one stray file, with dry-run option.

Instructions

dbabrain common.cli delete-file: ONE stray file to delete by force, inside a named folder (delete-files is refused). Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • host: Where the file is: {runtime (windows | linux | docker | k8s), access (ssh | winrm), host, port, username, password | key_file, container, sudo}; omitted = this machine.

  • path: The ONE file, by its absolute path - never a pattern, never a folder.

  • paths: A list of files: REFUSED since 0.38.0, by delete-files whatever else the request carries and by delete-file before the host is reached.

  • must_be_under (required): The folder the file must be strictly inside; the fence itself is never deleted.

  • force: delete-file: must be true - this file has no stored facts to be held to. Without it the command refuses and names delete-verified-file.

  • dry_run: Measure the file and answer what would be deleted; delete nothing.

  • timeout_seconds: Seconds the host may take: the file is hashed at disk speed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "delete-file"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, yet the description adds substantial context beyond them: the must_be_under fence is never itself deleted, `force` must be true because this file has no stored facts, `paths` has been refused since 0.38.0 before the host is reached, and emergency-operations commands require `confirm: "yes"` plus `reason`. That is exactly the kind of safety and refusal behavior an agent needs before invoking a destructive tool.

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?

Front-loaded with the core purpose and refusal rule, then a scannable bullet list of request fields. A couple of lines are loose, such as the generic 'Changes or removes something' and the long clause about emergency-operations commands, which could be tighter, but nothing is genuinely wasted.

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?

For a destructive, one-parameter tool with a free-form request object, the description covers required fields, refusal paths, safety gating, dry-run semantics, host addressing variants, and hashing/timeout behavior. An output schema exists, so return values need not be explained, and nothing needed to call it correctly is missing.

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?

Schema coverage is 0% and the single `request` parameter is a free-form object with additionalProperties, so the description carries the entire burden. It enumerates every meaningful field (host with its runtime/access/port/credential variants, path, paths, must_be_under, force, dry_run, timeout_seconds) and marks which are required and which are refused, which is far more than the schema provides.

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 with an explicit scope constraint: delete exactly ONE stray file, by absolute path, inside a named folder. It also names the siblings it is not (delete-files, delete-verified-file), so an agent can distinguish it without opening any schema.

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?

Gives explicit when-to-use and when-not-to-use rules: `paths` is refused by delete-files and also by this tool, and a missing `force` causes a refusal that points the caller at delete-verified-file. The `dry_run` option for a no-op preview is also spelled out.

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

Deploy Server

Other Tools