delete_org_doc
Delete a document, a directory, or an entire folder. TWO CALLS, ALWAYS: the first returns what would be deleted and a confirm_token, and deletes NOTHING — show that to the person you are working for, get their answer, then call again with the token. Never confirm on their behalf. Requires OWNER on every file this would remove — including files you cannot see — and refuses the whole operation if even one is out of reach, rather than half-emptying anything. location names a file (deleted on its own) or a directory (everything beneath it). Pass a bare folder name to delete the WHOLE folder, which also removes its connector sync source and requires confirm_delete_folder. Sharing is NOT withdrawn: reach grants survive a delete, which is what lets undo_delete restore the folder with its sharing intact. History is content-addressed, so this is recoverable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | Bearer token identifying the principal. Usually omitted — supplied by the transport (HTTP Authorization header or the server's AGENTLEFS_TOKEN env). Only pass this to override. | |
| location | Yes | full path from the workspace root, e.g. "handbook/vendor/acme.md" (as printed by list_org_docs or search_org_knowledge) | |
| confirm_token | No | OMIT on your first call — you get back what would be deleted, plus this token. SHOW THAT TO THE PERSON YOU ARE WORKING FOR and get their answer before calling again with it. | |
| confirm_delete_folder | No | required ONLY when deleting a whole folder: the folder's name again, exactly |