attachment_create
Attach a local file to an OmniFocus task or project by specifying its file path and the target's ID. The file is embedded in the database.
Instructions
Add a file attachment to a task or project from a local file path. The file is embedded into the OmniFocus database. Path must be within the allowed scope (default: $HOME; override via OMNIFOCUS_ATTACHMENT_PATHS). File must not exceed the size cap (default 100 MB; override via OMNIFOCUS_MAX_ATTACHMENT_MB). Returns { id, ownerKind, ownerName } — ownerKind is 'task' or 'project' and ownerName is the parent's display name (null only if the parent was deleted between the add and the lookup) so the agent can describe the new attachment without a follow-up read. Mutations do not propagate until sync_trigger is called. Example: attachment_create({ taskId: "abc123", filePath: "/Users/me/report.pdf" })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | No | Persistent ID of the task that owns the attachment. Provide exactly one of taskId or projectId. | |
| filePath | Yes | Absolute path to the source file to attach. Must be within the allowed attachment path scope. | |
| projectId | No | Persistent ID of the project that owns the attachment. Provide exactly one of taskId or projectId. |