webhook_register
Register an outbound webhook that fires on OmniFocus state changes. Supports triggers for task completion, creation, or project status changes, with optional filters and HMAC signature verification.
Instructions
Register an outbound webhook that fires when an OmniFocus state change matches the supplied trigger. Off by default — requires OMNIFOCUS_WEBHOOKS_ENABLED=1 in the environment, mirroring the raw-script gating. URLs must use https:// (http:// is rejected at registration). An optional secret enables HMAC-SHA256 signature verification by the receiver via X-OmniFocus-Signature: sha256=; the secret is stored on disk only and is never echoed back through any tool response. Do NOT use this to call this MCP server itself — webhooks are outbound only. Returns { webhook: WebhookSummary } where the summary omits both URL and secret. Side effects: writes to the registry config file at ~/Library/Application Support/omnifocus-mcp/webhooks.json (mode 0600). Example: webhook_register({ name: "slack-billing", url: "https://hooks.slack.com/services/...", trigger: { on: "task-completed", filter: { tagId: "tag_xyz" } } })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Outbound HTTPS URL. http:// is rejected at registration (per ADR-0016 §4b). | |
| name | Yes | Stable name for the webhook. Unique within the registry; used as the lookup key. ≤64 chars, no whitespace. | |
| secret | No | Optional HMAC seed (8–256 chars). When set, every delivery includes an X-OmniFocus-Signature: sha256=<hex> header so the receiver can verify authenticity. Stored on disk only; never echoed. | |
| trigger | Yes | What triggers a webhook fire — one of task-completed, task-created, or project-status-changed. Each variant accepts an optional filter narrowing which entities count. |