Files

Delete a file

files_delete · Deletes data · Markdown

Deletes a file for good; every download link to it stops working.

Free

This tool costs nothing to call.

An example

Delete the old draft of the price list from our files.

Your agent callsfiles_deleteFree

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "file_id": "4b6d8f0a-2e5a-4b7d-9f1b-3d5f7b9d1c4f"
}
What comes back
{
  "deleted": "4b6d8f0a-2e5a-4b7d-9f1b-3d5f7b9d1c4f",
  "storage": {
    "used": "0 bytes",
    "quota": "1 GB",
    "used_bytes": 0,
    "quota_bytes": 1073741824,
    "extra_blocks": 0
  }
}

Use it when

A file is no longer needed, or must go for privacy.

What it does

Delete a file for good. Every download link to it stops working.

What comes back

deleted: the file_id, and storage: how much is used and free now. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
file_idRequiredstringThe file_id files_upload returned. Exactly 36 characters.

The call

Over MCP, call files_delete on https://api.conecto.chat/mcp/files. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/files_delete \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id":"4b6d8f0a-2e5a-4b7d-9f1b-3d5f7b9d1c4f"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No file of the business has that file_id.Find it with files_list.
in_use409The file is a receipt in the books, a bank statement its lines came from, a bill's PDF, an HR document, part of a signature request, or the PDF of an invoice, credit note, quote or purchase order as it was sent (kept as long as the business's records are).Take it off there first, as the message says; a sent document's PDF stays.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md