Skip to main content
Glama

delete_file

Destructive

Delete one file, or up to 100 with 'fileIds', and all their chunks and vectors. To update a file, delete it first then re-upload with upload_file. With 'fileIds' it returns per-file success/failure results.

Instructions

Delete one file, or up to 100 with 'fileIds', and all their chunks and vectors. To update a file, delete it first then re-upload with upload_file. With 'fileIds' it returns per-file success/failure results. If your token asks before deleting, nothing is deleted yet: the call returns a deletion batch that Connapse carries out itself once your owner approves it. Read the outcome with deletion_status; don't repeat the call. A held batch holds at most 50 files.

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": {
      "containerId": "<containerId>"
    },
    "name": "delete_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileIdNoFile (document) ID to delete
fileIdsNoSeveral files instead of one: JSON array of file (document) IDs, e.g. ["id1","id2"]. Max 100. Use instead of fileId.
containerIdYesContainer ID or name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.4.2
    • addedInput schema / properties / fileId / default
      Added value: +null
    • changedInput schema / properties / fileId / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedInput schema / properties / fileIds
      Added value: +{
      +  "default": null,
      +  "description": "Several files instead of one: JSON array of file (document) IDs, e.g. [\"id1\",\"id2\"]. Max 100. Use instead of fileId.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedInput schema / required
      Previous value: -[
      -  "containerId",
      -  "fileId"
      -]New value: +[
      +  "containerId"
      +]
  2. First observedv0.3.2

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only supply destructiveHint=true; the description adds far more: cascading removal of chunks and vectors, per-file results when using fileIds, and a full approval-workflow where nothing is deleted until the owner approves and a held batch is capped at 50 files. This is exactly the context 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 action and scope, then the alternative flows. Six sentences is dense but nearly all carry distinct operational facts; the closing sentence on the 50-file held cap could have been folded into the approval sentence.

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, and the description compensates by describing return shapes: per-file success/failure with fileIds, and a deletion batch object for approval-gated calls that must be resolved via deletion_status. Nothing essential for correct invocation is missing.

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 coverage is 100%, so the baseline is 3, but the description adds meaning: choosing 'fileIds' changes the return shape to per-file success/failure, and batch deletes may be held at a 50-file cap even though the parameter allows 100. Those are consequences of parameter choice that the schema does not convey.

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 ('Delete one file... and all their chunks and vectors') plus the batch variant via 'fileIds'. It implicitly separates itself from container_delete by scoping to files, and explicitly routes update scenarios to upload_file.

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 concrete when-to guidance ('To update a file, delete it first then re-upload with upload_file'), a when-not to retry ('Read the outcome with deletion_status; don't repeat the call'), and explains the approval-gated path. The agent knows which sibling to call next in every branch.

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