Skip to main content
Glama

run_dag

Execute a declarative multi-step AWS query DAG across selected accounts, letting later steps reference earlier outputs and requiring confirmation before destructive actions.

Instructions

Run a small declarative multi-step query DAG against every resolved account.

Each entry in ``steps`` is
``{"id": ..., "service": ..., "operation": ..., "params": {...},
"extract": "...", "depends_on": [...]}``.

A later step's ``params`` may reference an earlier step's extracted output
anywhere a literal would go, via ``{"$ref": "<step_id>"}``. There is no
expression language and nothing is ever evaluated as code.

Every resolved account runs its own independent copy of the whole DAG, with
one credential mint per account rather than one per step. As with
``aws_query``, AWS IAM is the sole authorization boundary for every step,
and ``max_items`` raises the per-account pagination ceiling for every step.
If any step deletes, terminates or detaches something, the user is asked to
confirm the whole DAG first; if they decline, nothing runs.

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": {
      "steps": "<steps>",
      "region": "<region>"
    },
    "name": "run_dag"
  }
}

Input Schema

NameRequiredDescriptionDefault
orgNo
orgsNo
stepsYes
regionYes
max_itemsNo
account_idNo
account_idsNo
environmentNo
account_nameNo
max_accountsNo
account_namesNo
name_containsNo
exclude_account_idsNo
exclude_account_namesNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • removedInput schema / properties / role
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Role"
      -}
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses no code evaluation, one credential mint per account, that each account runs an independent copy, that IAM is the sole authz boundary, that max_items raises the pagination ceiling for every step, and that destructive steps trigger an all-or-nothing confirmation prompt. Missing are partial-failure semantics, DAG size limits ('small' is undefined), and whether steps run in parallel or sequence.

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

Conciseness5/5

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

Purpose is front-loaded, and every subsequent sentence adds behavioral or parameter information that cannot be inferred elsewhere. The inline step-shape literal is dense but earns its space given 0% schema coverage.

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?

The output schema means return values need not be described, and the DAG mechanics are covered well. But for a 14-parameter tool with nested step objects, the total silence on account-selection semantics, region, and per-account failure handling leaves meaningful gaps an agent would need to call it confidently.

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 0% across 14 parameters, so the description must compensate. It does this excellently for 'steps' (full entry shape and $ref substitution rules) and for 'max_items', but the eleven account/org selector parameters (org, orgs, account_ids, environment, account_name, name_contains, exclude_*) and 'region' get no explanation at all — an agent must guess precedence and whether selectors intersect or union.

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?

Opens with a specific verb and resource ('Run a small declarative multi-step query DAG against every resolved account'), and the 'multi-step' framing plus the explicit comparison to aws_query distinguishes it from that single-query sibling. An agent can tell what this does without opening the schema.

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 only implied: 'small' DAG and the aws_query parallel hint that this is for multi-step dependent reads rather than one-off queries, but there is no explicit when-to-use / when-not statement or named alternative rule. The confirmation-on-destructive-steps note adds useful conditional context but is not routing guidance.

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