host.trigger.set
Run a published tool on a cron schedule (5-field: minute hour day-of-month month day-of-week, UTC), give it a public webhook URL (kind="event"): a signed POST to that URL runs the tool with the event as its argument, fire it whenever this tenant receives a message (kind="message"): the tool runs with the message envelope as its argument, or give it an inbound-inbox URL (kind="webhook"): a verified POST lands as a row in state table inbox_ and fires the tool with that row as its argument -- the response carries {url, secret} once (host.trigger.get afterwards never returns the secret again). Each firing/delivery is a run visible in host.runs.list(trigger="schedule"|"event"|"message"|"webhook"). Refuses schedules_max (trigger_quota_exceeded, shared by schedule and webhook triggers), event_triggers_max (shared by event and message triggers) or a too-short schedule interval (trigger_interval_too_short); an invalid expression or verify config fails trigger_invalid naming the field.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tz | No | kind="schedule" P1: only "UTC" (or omitted) works today. | |
| args | No | Arguments passed to the tool on each firing/delivery (kind="schedule"/"event" only -- a message trigger's whole argument is the message envelope and a webhook trigger's whole argument is the stored inbox row). | |
| from | No | kind="message": only fire for messages from this address (@handle or t_... namespace); omit to fire for any sender. | |
| kind | No | "schedule" (default), "event", "message" or "webhook". | |
| name | No | kind="webhook": letters/digits/underscore -- becomes the inbox_<name> state table each accepted delivery is stored in. | |
| tool | Yes | The published tool this trigger runs. | |
| verify | No | kind="event": {scheme: "hmac-sha256"|"hmac-sha1"|"token"|"none", header, secret (a host.secret_set name), prefix?, timestamp_header?, tolerance_s?, allow_unverified? (required true for scheme "none")}. kind="webhook": a plain string, one of "hmac" (default; checks X-Mcphost-Signature: sha256=<hex>), "none", or "stripe" (checks Stripe-Signature the way Stripe itself signs, using the same generated secret). | |
| schedule | No | kind="schedule": 5-field cron expression (minute hour day-of-month month day-of-week), UTC. Supports *, lists, ranges and steps. | |
| channel_id | No | kind="message": scope this trigger to one group channel's posts (host.channel.open's channel_id) instead of ordinary host.msg.send/reply deliveries. | |
| tenant_key | No | The key `signup` returned. Required only when this connection carries no Authorization: Bearer header -- when both are present, the header wins. | |
| dedupe_header | No | kind="event": a header (e.g. X-GitHub-Delivery) whose repeated value within 24h answers 202 with the original run id instead of running again. |