Skip to main content
Glama

Connect a monitor to an action

writ_wire_monitor

Connects a monitor's change_detected event to an action: action='notify' (channels and recipients the account has configured), 'workflow' (runs a saved workflow), or 'ai_task' (an AI agent opens the page and works prompt). A price watch takes threshold (+ threshold_op): the action then runs once, when a check reads a price at or below it. Buying at a price (buy): writ_help('writ_wire_monitor').

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": {
      "monitor_id": "<monitor_id>",
      "action": "<action>"
    },
    "name": "writ_wire_monitor"
  }
}

Input Schema

NameRequiredDescriptionDefault
buyNoRun the workflow or task as a purchase (saved as a rehearsal until armed).
nameNo
titleNo
actionYesnotify | workflow | ai_task.
deviceNo
promptNoaction='ai_task': what the agent does.
enabledNo
messageNo
channelsNoNotification channels, e.g. ["email","pushover"].
workflowNo
entry_urlNo
max_stepsNo
thresholdNoPrice watch: act once when the price reaches this number.
monitor_idYes
recipientsNoe.g. ["email:3"]; omitted = every enabled recipient.
workflow_idNo
threshold_opNolte (default) | lt | gte | gt.
ai_session_idNo
cooldown_minutesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / ai_session_id
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / cooldown_minutes
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / device
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / enabled
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / entry_url
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / max_steps
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / message
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / name
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / title
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / workflow_id
      Added value: +{
      +  "type": "integer"
      +}
  2. Changed21 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"What to do on a detected change."New value: +"notify | workflow | ai_task."
    • removedInput schema / properties / ai_session_id
      Removed value: -{
      -  "description": "action='ai_task': re-run this saved AI session instead of (or as well as) a prompt.",
      -  "type": "integer"
      -}
    • changedInput schema / properties / buy / description
      Previous value: -"action='workflow': the workflow is a checkout and runs as a purchase. action='ai_task' (with a `prompt` saying what to buy): an AI purchase session browses to the order page and Writ checks out. Always saved with dry_run on (a rehearsal that places no order), whatever is sent; the user arms real purchases in the Writ app. Cloud monitors only; an AI purchase session can't use device_card."New value: +"Run the workflow or task as a purchase (saved as a rehearsal until armed)."
    • removedInput schema / properties / buy / properties
      Removed value: -{
      -  "commit_selector": {
      -    "description": "action='workflow' only: the place-order button on the final page (CSS, at most 500 characters). Never click it: Writ clicks it during a live buy. A live buy needs it (or a recorded order step, or fallback_ai_session).",
      -    "type": "string"
      -  },
      -  "confirm_over": {
      -    "description": "Ask for approval only above this amount (default: the threshold).",
      -    "type": "number"
      -  },
      -  "fallback_ai_session": {
      -    "description": "action='workflow' only: when the recorded checkout fails at fire time, or has no order step, wake one AI purchase session with the same limits (once per fire).",
      -    "type": "boolean"
      -  },
      -  "max_amount": {
      -    "description": "AI purchase session: the most one order may cost (0.01-10000). The page and the agent may lower it, never raise it.",
      -    "type": "number"
      -  },
      -  "payment": {
      -    "description": "Required. {kind, ref}: kind vault_card | virtual_card | device_card (ref = the card's id from writ_payment action='list', or an approved grant's payment.ref) or merchant_saved (the card saved on the store account; no ref).",
      -    "properties": {
      -      "kind": {
      -        "enum": [
      -          "vault_card",
      -          "virtual_card",
      -          "device_card",
      -          "merchant_saved"
      -        ],
      -        "type": "string"
      -      },
      -      "ref": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  },
      -  "price_buffer_pct": {
      -    "description": "Tax and shipping allowance over the price, 0-100 (default 20).",
      -    "type": "number"
      -  },
      -  "require_confirmation": {
      -    "description": "Hold a purchase for the user's approval (default true).",
      -    "type": "boolean"
      -  },
      -  "spend_cap": {
      -    "description": "Most the automation may spend per period: {amount, period: day|week|month} or a number (per day). Default with a threshold: one buy at the threshold plus the buffer, per day.",
      -    "type": [
      -      "object",
      -      "number"
      -    ]
      -  },
      -  "total_selector": {
      -    "description": "CSS selector of the order total on the checkout page; the run stops before placing an order whose total is above the allowed amount.",
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / buy / required
      Removed value: -[
      -  "payment"
      -]
    • changedInput schema / properties / channels / description
      Previous value: -"Notification channels, e.g. [\"pushover\",\"email\"] — required for action='notify'; optional with action='ai_task' (finish alert)."New value: +"Notification channels, e.g. [\"email\",\"pushover\"]."
    • removedInput schema / properties / cooldown_minutes
      Removed value: -{
      -  "description": "action='ai_task': minimum minutes between wakes (default 10; 0 disables).",
      -  "type": "integer"
      -}
    • removedInput schema / properties / device
      Removed value: -{
      -  "description": "A linked Writ desktop's agent_id (writ_devices) to act on. Omitted: the desktop this connection chose with writ_devices action='use', if any.",
      -  "type": "string"
      -}
    • removedInput schema / properties / enabled
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / entry_url
      Removed value: -{
      -  "description": "action='ai_task': page the agent starts on (defaults to the monitored URL).",
      -  "type": "string"
      -}
    • removedInput schema / properties / max_steps
      Removed value: -{
      -  "description": "action='ai_task': cap on agent steps per wake (default 20, max 100).",
      -  "type": "integer"
      -}
    • removedInput schema / properties / message
      Removed value: -{
      -  "description": "Notification body template (supports {{event.url}}).",
      -  "type": "string"
      -}
    • removedInput schema / properties / monitor_id / description
      Removed value: -"Monitor id from writ_create_monitor."
    • removedInput schema / properties / name
      Removed value: -{
      -  "description": "Optional automation name.",
      -  "type": "string"
      -}
    • changedInput schema / properties / prompt / description
      Previous value: -"action='ai_task': what the agent does when the monitor fires, e.g. \"Check whether the price dropped below $500 and summarize what changed\". Supports {{placeholders}} like {{diff_snippet}} and {{extracted.price}}. With `buy`, say exactly what to buy (product, quantity, options, shipping)."New value: +"action='ai_task': what the agent does."
    • changedInput schema / properties / recipients / description
      Previous value: -"Notification recipients, e.g. [\"pushover:1\"]. Omitted = every enabled recipient on the channel; the answer names who the alert actually reaches, and warns when nobody is configured."New value: +"e.g. [\"email:3\"]; omitted = every enabled recipient."
    • changedInput schema / properties / threshold / description
      Previous value: -"Price watch: act only when the watched price reaches this number (e.g. 477.04), once; by default at or below it (see `threshold_op`), and a price on the other side, or one the page no longer shows, does nothing. Needs a monitor that reads the price (a selector or extract, not a visual zone). Without it, any change fires. Works for a desktop monitor too (`device`)."New value: +"Price watch: act once when the price reaches this number."
    • changedInput schema / properties / threshold_op / description
      Previous value: -"Which side of `threshold` fires: lte = at or below (default: \"drops to 477.04\" fires at 477.04), lt = strictly below (\"below / under / less than\"), gte = at or above, gt = strictly above (a rise alert)."New value: +"lte (default) | lt | gte | gt."
    • removedInput schema / properties / title
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / workflow / description
      Removed value: -"Workflow to run (name) — required for action='workflow'."
    • removedInput schema / properties / workflow_id
      Removed value: -{
      -  "type": "integer"
      -}
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true), so the description's job is to add semantics — and it does, disclosing the one-shot firing behavior for price watches and that the action runs when a check reads a price at or below the threshold. It does not say what happens when a monitor is re-wired (replace vs. append), nor how often checks run, which are the main behavioral gaps for an open-world, non-idempotent mutation.

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?

Three front-loaded sentences with the core wiring semantics first, then the price-watch special case, then the escape hatch. The final fragment ('Buying at a price (`buy`): writ_help(...)') is telegraphic and could read as a dangling clause, but nothing is wasted.

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?

For a 19-parameter, nested-object mutation with no output schema and 37% schema coverage, the description covers the decision-critical parts (which action, price-watch one-shot, buy delegation) but leaves the agent without guidance on the many tuning parameters or on what the call returns. Adequate to invoke correctly in the common case, not complete.

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

Parameters3/5

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

Schema coverage is 37% across 19 parameters, so the description must carry weight; it explains action, prompt, channels/recipients, threshold, threshold_op, and buy, which is real added meaning. However, roughly half the surface — name, title, device, enabled, message, entry_url, max_steps, cooldown_minutes, workflow_id, ai_session_id — is left undocumented in both schema and description, so the compensation is partial.

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?

The description opens with a specific verb and resource — connecting a monitor's change_detected event to an action — and then enumerates the three action modes (notify, workflow, ai_task) so an agent knows exactly what the tool produces. It doesn't distinguish itself explicitly from the nearest sibling (writ_create_monitor), which is why it stops short of a 5.

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

Usage Guidelines4/5

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

It tells the agent which action value to pick and under what conditions: price watches take threshold/threshold_op and fire once, and buy scenarios are routed to writ_help('writ_wire_monitor') rather than guessed. There is no explicit when-not-to-use-this-tool guidance or prerequisite statement (e.g. that a monitor must already exist), leaving a small gap.

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.