attachment_delete
Removes an attachment from a task or project using the attachment ID. Deletion is permanent; use sync_trigger to propagate.
Instructions
Remove an attachment from a task or project by attachment ID. Do not use to retrieve or export attachment content — use attachment_save_to_path instead. Returns { removed: true, attachmentId, ownerKind, ownerName } — ownerKind is 'task' or 'project' and ownerName is captured BEFORE the JXA call so it survives even if the lookup were to fail post-mutation; null only when the parent itself has been deleted. The agent can describe the removal without a follow-up read. Throws NotFound if the attachment or owner does not exist. Permanent — cannot be undone. Mutations do not propagate until sync_trigger is called. Example: attachment_delete({ taskId: "abc123", attachmentId: "att456" })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | No | Persistent ID of the task that owns the attachment. Provide exactly one of taskId or projectId. | |
| projectId | No | Persistent ID of the project that owns the attachment. Provide exactly one of taskId or projectId. | |
| attachmentId | Yes | Persistent ID of the attachment to remove. Get from attachment_list. |