Skip to main content
Glama

orchestrator_validate_agent_dag

Read-onlyIdempotent

Validates multi-agent execution DAGs before orchestration by detecting cycles, checking critical-path latency budgets, enforcing HTTPS agent-card URLs, and flagging scope widening.

Instructions

Static & runtime validator for multi-agent A2A execution DAGs (nodes[] with agent_card_url, scopes[], timeout_ms; edges[] from -> to) — runs Kahn's topological sort to catch cycles, computes critical-path latency budget, flags S4-REJECT-005 / non-HTTPS agent-card URLs, and flags confused-deputy scope widening (child_scopes - parent_scopes).

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": {
      "nodes": "<nodes>"
    },
    "name": "orchestrator_validate_agent_dag"
  }
}

Input Schema

NameRequiredDescriptionDefault
edgesNoDirected dependency edges (`{from, to}`).
nodesYesList of agent DAG nodes (`{id, agent_card_url, scopes?, timeout_ms?, agent_card?}`).
max_budget_msNoMaximum allowed critical-path execution latency in milliseconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is covered. The description goes meaningfully beyond that by disclosing the actual validation algorithm (Kahn's topological sort), the derived metric (critical-path latency), the specific failure code it emits (S4-REJECT-005), and the confused-deputy rule (`child_scopes - parent_scopes`). What it omits is what a failure looks like to the caller — whether validation raises, returns an error list, or reports per-node violations.

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?

It is a single dense sentence, front-loaded with the object of validation followed by the check list, with zero filler or marketing language. It is slightly run-on — the em-dash parentheticals stack three clauses — so an agent must parse a long sentence, but nothing could be deleted without losing a distinct check.

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

Completeness4/5

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

For a read-only validation tool with a fully documented 3-parameter schema, the description covers what is validated and why each input matters. The remaining gap is the response contract: with no output schema, the definition never says whether the result is a pass/fail boolean, a list of violations, or a latency figure, which an agent needs in order to act on the outcome.

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?

Schema description coverage is 100%, so the baseline is 3, but the description adds real meaning: it identifies which node fields matter (`agent_card_url`, `scopes[]`, `timeout_ms`), that edges are `from -> to` directional dependencies, and — most usefully — that `scopes` feeds the confused-deputy widening check and `timeout_ms`/critical path relate to the latency budget. That is purpose-level semantics the schema does not convey.

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?

The description names a specific verb and resource ('Static & runtime validator for multi-agent A2A execution DAGs') and then enumerates the exact checks it performs (cycle detection via topological sort, critical-path latency budget, S4-REJECT-005 / non-HTTPS agent-card URLs, confused-deputy scope widening). No sibling tool does anything resembling DAG validation, and the enumeration alone distinguishes it cleanly.

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 phrasing 'Static & runtime validator for ... DAGs' — an agent can infer it should call this before executing a multi-agent DAG. However, there is no explicit when-to-use statement, no when-not-to-use case, and no routing to alternatives such as orchestrator_create_task or orchestrator_inspect_task_lineage. The guidance remains inferential rather than stated.

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