Write

delete_stack

Permanently deletes a stack and all of its cards from an outline, with a required confirmation gate to prevent accidental data loss.


Destructive

This tool permanently removes a stack and every card inside it. Omit confirm or pass confirm: false to get a safe preview first — no changes are made until you explicitly pass confirm: true. Deletions cannot be undone.

Parameters

NameTypeRequiredDescription
outlineIdstringID of the outline to target. Defaults to the authenticated creator's own outline if omitted.
stackIdstringYesID of the stack to delete. All cards within this stack will also be permanently removed.
confirmbooleanMust be true to execute the deletion. If omitted or false, the tool returns a preview of what would be removed (stackId, stackTitle, cardCount, and a list of cards) without making any changes.

Response

FieldTypeWhat it means
previewbooleanPresent and true when confirm was not passed (or was false). Indicates no changes were made — this is a dry-run response only.
messagestringHuman-readable description of what will happen. Only present in preview mode.
willDeleteobjectPreview-mode only. Contains stackId, stackTitle, cardCount, and a cards array (each with cardId and heading) showing exactly what would be removed.
outlineIdstringID of the outline that was modified. Only present in confirmed (non-preview) success responses.
deletedobjectConfirmed deletion receipt. Contains stackId confirming which stack was removed. Only present when confirm:true was passed and the operation succeeded.

Example

Request

json
{ "stackId": "stack_photography_work", "confirm": true }

Response

json
{ "outlineId": "42", "deleted": { "stackId": "stack_photography_work" } }

When to use

Call this during the curate or restructure phase when a creator wants to remove an entire section (e.g., consolidating stacks or removing outdated work). Always call without confirm first to show the creator the full impact (card count and titles) before executing.


Gotchas

Watch out

  • confirm: true is required to actually delete — omitting it always returns a preview, never an error, so agents may incorrectly assume the deletion happened
  • Deleting the last stack is blocked by a minRows floor; the tool returns a MIN_ROWS error instead of proceeding, so always verify the outline has more than one stack before calling
  • All cards inside the stack are permanently deleted along with it — there is no way to recover them after a confirmed deletion
  • stackId must match a stack in the resolved outline exactly; a mismatch returns NOT_FOUND rather than a partial match