Skip to main content
Glama

Delete File

delete_file
Destructive

Delete a file or empty directory within an allowed directory. Provide the path to remove the target filesystem entry in the JavaBytes sandbox.

Instructions

Delete a file or an empty directory inside an allowed directory.

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

Input Schema

NameRequiredDescriptionDefault
pathYesFile path

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and openWorldHint=false, so the safety profile is covered. The description still contributes real behavioral context the annotations don't: deletion is restricted to allowed directories and only empty directories can be removed, which tells the agent a non-empty directory will fail.

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?

One sentence, front-loaded with the action and immediately followed by the two constraints that matter. No filler, no redundancy with the title or schema.

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?

For a one-parameter destructive tool whose annotations already carry the safety profile, the definition covers scope and the empty-directory constraint. It stops short of stating whether deletion is permanent/recoverable or how failures outside the allowed directory surface, which are the remaining details an agent might want.

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?

There is a single required parameter with 100% schema description coverage, so the baseline is 3. The description implies the path may point to either a file or an empty directory, a small but genuine addition; nothing is said about path format, relative vs absolute, or whether the allowed-directory root is implicit.

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 (Delete) and a precise resource set: a file or an empty directory. The scope qualifier 'inside an allowed directory' further narrows what the tool operates on, which is more than a restatement of the name.

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?

Usage is implied rather than stated: an agent can infer this is the deletion path and that non-empty directories are out of scope, but there is no explicit 'use X instead for backups/removal of populated directories' routing despite siblings like backup_file and write_file existing.

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