Skip to main content
Glama
Rootly MCP server

Rootly MCP server

Official
by rootlyhq

Run Ai Automation

run_ai_automation
Destructive

Trigger a saved AI automation to run once, executing its stored prompt with only its allowed tools and posting the answer to its configured destination or a specific incident.

Instructions

Run an existing AI automation now, once. The run executes that automation's saved prompt with only the tools in its allowed_tool_keys, and posts the answer to its configured destination; it cannot run arbitrary instructions. Pass incident_id to run it against an incident, or run_id to re-run a previous run. Returns the run; poll get_ai_automation_run for its status and output. An AI automation is a saved instruction (prompt) that a Rootly AI agent runs on a schedule, on a matching event (incident, alert, Slack message, webhook) or on demand. When it runs, the agent may only use the tools listed in the automation's allowed_tool_keys (all team-allowed tools when null), and it posts its answer to the configured destination (a Slack channel or the incident timeline), or nowhere when destination_kind is none.

Requires OAuth scope ai.automations:write. For run-now requests with incident_id, or run_id of an incident-linked run, OAuth tokens also need the ir.incidents:read scope; API keys use the key's role. Limited to 30 requests per credential per minute (fixed one-minute windows), separate from the default mutation rate limit; exceeding it returns 429 with Retry-After.

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": {
      "ai_automation_id": "<ai_automation_id>",
      "data": "<data>"
    },
    "name": "run_ai_automation"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYes
ai_automation_idYesRequired. ID of the ai automation (fills `{ai_automation_id}` in /v1/ai/automations/{ai_automation_id}/runs).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare destructiveHint=true, idempotentHint=false and openWorldHint=true; the description earns credit by adding what the annotations cannot: the run executes only the automation's saved prompt against its allowed_tool_keys, posts the answer to the configured destination (or nowhere when destination_kind is none), and returns a run object that must be polled rather than a finished answer. It also discloses OAuth scopes (ai.automations:write, plus ir.incidents:read for incident-linked runs) and a separate 30-requests-per-minute limit with 429/Retry-After. It stops short of saying whether repeated runs post duplicate messages to the destination, which is the main destructive risk left implicit.

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?

The action and its immediacy are front-loaded in the first sentence, and the operational details (scope, rate limit, scopes) follow in a logical order. The explanatory paragraph defining an AI automation and its allowed_tool_keys/destination_kind behavior is somewhat long for a run trigger and repeats the scope requirement already stated in the schema, keeping it from a 5.

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

Completeness5/5

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

For a two-parameter mutation with a nested envelope, the description covers purpose, execution semantics, follow-up polling, authorization scopes, and rate-limit failure behavior. An output schema exists, so the description is not obliged to detail the returned run object, and its pointer to get_ai_automation_run covers the async gap adequately.

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

Parameters4/5

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

With only 50% schema description coverage, the description carries real weight: it explains that incident_id scopes the run to an incident and run_id re-runs a previous run, and the schema itself documents their mutual exclusivity. The ai_automation_id parameter is covered only implicitly by "Run an existing AI automation." The added meaning is genuine but not exhaustive over the nested data/attributes envelope.

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

Purpose5/5

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

"Run an existing AI automation now, once" gives a specific verb (run), resource (AI automation) and scope (now, single execution), and explicitly rules out the neighbouring capability by noting it cannot run arbitrary instructions. It also defines what an AI automation is, so an agent can distinguish this from create_ai_automation, update_ai_automation, and the read-only siblings without opening a schema.

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

Usage Guidelines5/5

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

The description states the selection logic between the two execution modes (incident_id for an incident, run_id for a re-run) and names the follow-up tool explicitly: "poll get_ai_automation_run for its status and output." It also sets a boundary on what the tool will do ("cannot run arbitrary instructions"), which is the key when-not condition an agent needs before calling it.

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

Deploy Server

Other Tools