Skip to main content
Glama

Create an automation

writ_create_automation

Creates an automation: on an event (a workflow or crawl completed, a monitor change, a webhook, a schedule) it runs a workflow, sends a notification templated over the event's data, and/or wakes an AI agent. Event, template and webhook options: writ_help('writ_create_automation').

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "writ_create_automation"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
whenNoworkflow_completed | crawl_completed | change_detected | webhook_received | scheduled | ...
titleNo
blocksNo
inputsNo
notifyNoMessage template, e.g. {{result.extracted_data.0.title}}.
enabledNo
channelsNoNotification channels.
priorityNo
scheduleNowhen='scheduled': {kind, interval_minutes | time, days, tz}.
ai_promptNoWake an AI agent with this task.
target_idNochange_detected: the monitor_id.
recipientsNo
descriptionNo
on_workflowNoSource workflow for workflow_* events.
ai_entry_urlNo
run_functionNo
run_workflowNoWorkflow to run.
ai_session_idNo
run_functionsNo
on_workflow_idNo
run_workflow_idNo
cooldown_minutesNo
target_selector_idNo
webhook_trigger_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • addedInput schema / properties / ai_entry_url
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / ai_session_id
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / blocks
      Added value: +{
      +  "items": {
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / cooldown_minutes
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / description
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / enabled
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / inputs
      Added value: +{
      +  "type": "object"
      +}
    • addedInput schema / properties / on_workflow_id
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / priority
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / recipients
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / run_function
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / run_functions
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / run_workflow_id
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / target_selector_id
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / title
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / webhook_trigger_id
      Added value: +{
      +  "type": "integer"
      +}
  2. Changed26 schema fields changed
    • removedInput schema / properties / ai_entry_url
      Removed value: -{
      -  "description": "Page the woken agent starts on. Defaults to the event's page (the monitored URL on change_detected); required in practice for workflow_*/webhook events.",
      -  "type": "string"
      -}
    • changedInput schema / properties / ai_prompt / description
      Previous value: -"Wake an AI agent with this task when the event fires. The agent gets the event context (page URL, diff, extracted values) and works the task in a cloud browser. Supports {{placeholders}}."New value: +"Wake an AI agent with this task."
    • removedInput schema / properties / ai_session_id
      Removed value: -{
      -  "description": "With when='ai_session_completed' / 'ai_session_started': only this AI session.",
      -  "type": "integer"
      -}
    • removedInput schema / properties / blocks
      Removed value: -{
      -  "description": "Raw flow tree instead of the action arguments (max 50): each {id, type: event|condition|action, blockType, config, parentId}. The first block is the root event (its blockType is the event: one of `when`; scheduled config {mode, interval_ms | time, days, tz}); every other block names an earlier block as parentId. Actions: workflow {workflow_id, function_name | function_names, input_mapping}; notification {template, title, channels, recipients}; ai_session {goal, entry_url}; scrape {urls:[<=5, templates ok], format: markdown|html|both, on_error} -> {{scraped.content}} {{scraped.pages}}; extract {source:'{{scraped.content}}', fields:[{key, from: html_css|json|regex|embedded_json|body, selector, attribute, all, path, pattern, group, number, required}]} -> {{extracted.<key>}}; crawl {seed_url, intent, include_paths, exclude_paths, page_budget, max_depth, extract_mode: markdown|schema, extract_schema, render_mode: auto|http|browser, persona_id} starts a fresh crawl (its rows arrive with crawl_completed, not in this chain); condition {field, operator, value}. Awaiting a run: an event block workflow_completed {linked_to_block:<workflow block id>}. Every string setting takes {{placeholders}}.",
      -  "items": {
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • changedInput schema / properties / channels / description
      Previous value: -"Notification channels for `notify`, e.g. [\"pushover\",\"email\"] (required for delivery)."New value: +"Notification channels."
    • removedInput schema / properties / cooldown_minutes
      Removed value: -{
      -  "description": "Minimum minutes between AI wakes for `ai_prompt` (default 10; 0 disables).",
      -  "type": "integer"
      -}
    • removedInput schema / properties / description
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / enabled
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / inputs
      Removed value: -{
      -  "description": "With run_workflow: its inputs {input_name: value}, each a literal or a {{template}} over the event (e.g. {{extracted.price}}, or {{payload.order.id}} from a webhook body); saved values fill the rest. Stored as plain JSON.",
      -  "type": "object"
      -}
    • removedInput schema / properties / name / description
      Removed value: -"Name for the automation (required)."
    • changedInput schema / properties / notify / description
      Previous value: -"Send a notification with this message — a template over the event's data (see the tool description: {{result.extracted_data.0.title}} after a workflow, {{rows.0.title}} / {{row_count}} after a crawl, {{extracted.price}} on a change)."New value: +"Message template, e.g. {{result.extracted_data.0.title}}."
    • changedInput schema / properties / on_workflow / description
      Previous value: -"Source workflow name whose event fires this (required for workflow_* events)."New value: +"Source workflow for workflow_* events."
    • removedInput schema / properties / on_workflow_id
      Removed value: -{
      -  "type": "integer"
      -}
    • removedInput schema / properties / priority
      Removed value: -{
      -  "type": "integer"
      -}
    • removedInput schema / properties / recipients
      Removed value: -{
      -  "description": "Notification recipients, e.g. [\"email:3\"]. Omitted = every enabled recipient on the channel; the answer names who the alert actually reaches, and warns when nobody is configured.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / run_function
      Removed value: -{
      -  "description": "One function name (alias of run_functions).",
      -  "type": "string"
      -}
    • removedInput schema / properties / run_functions
      Removed value: -{
      -  "description": "With run_workflow: call these functions of a multi-function workflow instead of the whole workflow — one run of the selection plus what it needs (sign-in, a token, the search whose ids another reads). Unset = the whole workflow.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • changedInput schema / properties / run_workflow / description
      Previous value: -"Workflow to run when the event fires (by name)."New value: +"Workflow to run."
    • removedInput schema / properties / run_workflow_id
      Removed value: -{
      -  "type": "integer"
      -}
    • changedInput schema / properties / schedule / description
      Previous value: -"With when='scheduled': {kind:'interval', interval_minutes:N} or {kind:'daily', time:'HH:MM', tz:'<IANA zone>'} or {kind:'weekly', time, days:[1..7] (1=Mon .. 7=Sun), tz}."New value: +"when='scheduled': {kind, interval_minutes | time, days, tz}."
    • removedInput schema / properties / schedule / properties
      Removed value: -{
      -  "days": {
      -    "items": {
      -      "type": "integer"
      -    },
      -    "type": "array"
      -  },
      -  "interval_minutes": {
      -    "type": "integer"
      -  },
      -  "kind": {
      -    "enum": [
      -      "interval",
      -      "daily",
      -      "weekly"
      -    ],
      -    "type": "string"
      -  },
      -  "time": {
      -    "type": "string"
      -  },
      -  "tz": {
      -    "type": "string"
      -  }
      -}
    • changedInput schema / properties / target_id / description
      Previous value: -"With when='change_detected' (required there): the monitor whose changes fire this, i.e. the monitor_id writ_create_monitor returned."New value: +"change_detected: the monitor_id."
    • removedInput schema / properties / target_selector_id
      Removed value: -{
      -  "description": "With target_id: only changes of this one selector of that monitor.",
      -  "type": "integer"
      -}
    • removedInput schema / properties / title
      Removed value: -{
      -  "description": "Notification title (with `notify`).",
      -  "type": "string"
      -}
    • removedInput schema / properties / webhook_trigger_id
      Removed value: -{
      -  "description": "With when='webhook_received': fire on this existing inbound webhook (its id from writ_list_webhooks) instead of minting a new URL. Its senders keep signing with its secret; one that has no secret yet gets one, shown once in the answer.",
      -  "type": "integer"
      -}
    • changedInput schema / properties / when / description
      Previous value: -"Event: workflow_completed | workflow_started | crawl_completed | crawl_failed | ai_session_completed | ai_session_started | change_detected (with `target_id`) | webhook_received (mints a signed URL; `webhook_trigger_id` reuses one) | scheduled (a clock, with `schedule`)."New value: +"workflow_completed | crawl_completed | change_detected | webhook_received | scheduled | ..."
  3. First observed

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true, idempotentHint=false), so the bar is lower. The description adds real value by explaining the event→action wiring and that templates interpolate event data, but it says nothing about persistence, permissions, or what happens on repeated creation (annotations already flag non-idempotency).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core action and followed by the event/action enumeration, then a compact pointer to the help tool. No filler, though the help-tool deferral is doing work that the description itself could partially do.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A 25-parameter, nested-object creation tool with no output schema warrants substantial explanation. Delegating enumeration detail to writ_help is a defensible strategy and the core event/action semantics are present, but an agent still cannot map the majority of parameters from this description alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 25 parameters at 32% schema description coverage, the description needs to carry weight, but it only gestures at 'event, template and webhook options' and outsources detail to writ_help. Key fields like blocks, inputs, channels, target_selector_id, cooldown_minutes and the on_workflow vs on_workflow_id duplication get no explanation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Creates') and resource ('an automation'), then explains the causal model: an event triggers a workflow run, a templated notification, and/or an AI agent wake. That mechanism is distinctive against siblings like writ_create_monitor or writ_run_workflow, though the description never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the event list and by the pointer to writ_help('writ_create_automation') for event, template and webhook options. There is no statement of when to choose this over creating a monitor or running a workflow directly, nor any prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.