Skip to main content
Glama

aanet_delete_file

Permanently remove a file — the missing piece of the file lifecycle alongside aanet_read_file/aanet_write_file/aanet_append_file. There is no undo: to recover, a sub-agent would need its own backup of the content. Fires a file_delete webhook event on success (see aanet_register_webhook). Raises a 404 if the path doesn't exist, a 409 if it's a directory or if_match doesn't match the current etag. Returns {path, deleted}.

Input Schema

NameRequiredDescriptionDefault
pathYesVirtual file path within the workspace. Must point to a file, not a directory.
fenceNoFencing token returned by aanet_acquire_lock/aanet_renew_lock. If another sub-agent has acquired that lock since, the call is rejected with 409 STALE_FENCE (free) instead of writing as a stale holder. Omit for an unguarded write.
api_keyYesBearer credential for this workspace: either the owner_key returned once by aanet_create_workspace/aanet_create_trial_workspace, or a sub-key returned by aanet_mint_subkey. Sent under the hood as `Authorization: Bearer <api_key>`. Owner-only tools reject a sub-key with a 403.
if_matchNoThe file's current etag, for the same conflict-detection purpose as on aanet_write_file.
fence_lockNoName of the lock the fence belongs to; defaults to the file path itself. Needs fence.
workspace_idYesThe workspace_id from aanet_create_workspace or aanet_create_trial_workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / fence
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Fencing token returned by aanet_acquire_lock/aanet_renew_lock. If another sub-agent has acquired that lock since, the call is rejected with 409 STALE_FENCE (free) instead of writing as a stale holder. Omit for an unguarded write.",
      +  "title": "Fence"
      +}
    • addedInput schema / properties / fence_lock
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Name of the lock the fence belongs to; defaults to the file path itself. Needs fence.",
      +  "title": "Fence Lock"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior5/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 and mostly delivers: irreversibility with no undo, a file_delete webhook side effect (cross-referenced to aanet_register_webhook), the 404 and 409 failure modes with their triggers, and the return shape {path, deleted}. The only omission is whether a sub-key is permitted or rejected with 403, but that is a minor gap against an otherwise unusually complete disclosure.

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 tight sentences: purpose first, then irreversibility and recovery caveat, then side effects, errors and return value. Nothing is redundant and no sentence is filler despite the density of information.

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?

No output schema exists, so the description appropriately supplies the return value {path, deleted} along with error semantics and webhook side effects. For a six-parameter destructive tool with zero annotation coverage, everything an agent needs to call it correctly is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3 and the schema already documents path, if_match, fence, fence_lock, api_key and workspace_id. The description still adds value by tying parameters to outcomes — path must be a file or yields 409, if_match mismatch yields 409 — which goes beyond the raw field docs.

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 opens with a specific verb+resource ("Permanently remove a file") and immediately positions it against named siblings (aanet_read_file/aanet_write_file/aanet_append_file), so an agent can distinguish it from the other file operations without opening any schema. The destructive framing 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 Guidelines4/5

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

It establishes clear context — the deletion half of the file lifecycle — and warns that there is no undo and recovery requires an external backup, which is genuine when-to-use guidance. It does not, however, name an alternative path (e.g., a move/archive tool) or spell out a when-not-to-use condition beyond the implicit irreversibility, so it stops short of full routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources