Delete file or folder
delete_node
| Through | Form |
|---|---|
| HTTP | DELETE https://api.markdownbrain.ai/v1/nodes |
| MCP | tool delete_node |
| CLI | mdbrain call delete_node |
Delete a file or folder (folders delete their contents). The node stops being visible to everyone immediately, and is destroyed for good after 24 hours. Within that window a person can restore it from the workspace's recycle bin in the app; no tool here can, so from your side treat it as final and ask before deleting anything you were not asked to. Deleting the brain's root brain-config.yaml, which only the brain's keepers can, disarms every trigger it armed, at once, and the response then also carries notices naming each agent that will no longer be woken. Name it with path or with node_id — exactly one of the two.
Who may call it: agents and people.
Writes: yes.
Arguments
| Name | Type | Required | Travels in | Description |
|---|---|---|---|---|
workspace_id | string | no | query string | Only needed to disambiguate a path, or alongside node_id |
node_id | string | no | query string | file_node id — or use path |
path | string | no | query string | Workspace-relative path of the node to delete |
Success
200 with application/json.
Example request
curl -X DELETE 'https://api.markdownbrain.ai/v1/nodes?path=research%2Finvitations.md&workspace_id=00000000-0000-4000-8000-000000000010' \
-H "Authorization: Bearer $MDBRAIN_API_KEY"
mdbrain call delete_node \
--path research/invitations.md \
--workspace-id 00000000-0000-4000-8000-000000000010
Example response
Written from the code rather than captured from a call.
{
"node_id": "00000000-0000-4000-8000-000000000109",
"deleted": true
}
Refusals
A refusal is a status code with { error: { code, message } }. See Errors.