Skip to main content
Glama
sangingeum
by sangingeum

file_delete

Destructive

Delete one specified file with expected-hash conflict protection and dry-run validation; returns an operation ID for undo if the path hasn't been recreated.

Instructions

Delete one file and return operation_id and undo_available. Destructive.

    Deletes exactly the named file: no glob, no recursion, no directory
    removal, and no widening of the workspace root. expected_hash refuses the
    delete when the content changed since it was read (CONTENT_CONFLICT).
    dry_run validates and deletes nothing. Otherwise the operation is
    recorded, and undo restores the file while nothing else has recreated
    that path.
    

Input Schema

NameRequiredDescriptionDefault
pathYes
dry_runNo
expected_hashNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructive=true and non-idempotent, so the safety profile is covered; the description goes well beyond by disclosing that the operation is recorded and undoable while nothing else has recreated the path, and by naming the CONTENT_CONFLICT failure mode. That is real operational context an agent could not get from the annotations.

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 correctly with the core action and return values in sentence one, and the remaining sentences each add a distinct constraint. Minor waste: "Destructive." only restates destructiveHint=true, and the final clause about undo is grammatically tangled.

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?

Covers action, scope limits, precondition behavior, dry-run semantics, return fields (operation_id, undo_available), undo limits, and a named error path — more than enough for a 3-parameter destructive tool with no output schema and full annotation coverage.

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%, so the description carries the full burden and does: expected_hash is explained as a precondition guard with a named error code, dry_run as validate-only, and path is constrained semantically (exactly one file, no globbing, no root widening). All three parameters acquire meaning not present in 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?

Opens with a specific verb+resource and an explicit scope constraint ("Delete one file"), then immediately bounds it: no glob, no recursion, no directory removal. That cleanly separates it from siblings like directory_delete, file_delete_lines, and file_apply_patch without naming them.

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?

Gives clear when-to-use context for the optional parameters (expected_hash refuses on content change, dry_run validates without deleting) and implicitly excludes directory/multi-file deletion. It stops short of naming an alternative tool to use when the target is a directory, leaving that routing to inference.

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