Skip to main content
Glama

validate_workflow

Validates workflow graph structure to catch duplicate or invalid IDs, dangling or self dependencies, gate references to non-direct dependencies, and dependency cycles without model calls.

Instructions

确定性结构校验(不调用模型):重复 id、非法 id 字符、悬空依赖、自依赖、门条件引用非直接依赖、依赖环。

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": {
      "id": "<id>"
    },
    "name": "validate_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does disclose one important trait: the operation is deterministic and does not invoke a model. It also implies which error categories surface in the result. It does not state that it is read-only/non-mutating, whether it raises on failure versus returning a list of violations, or anything about idempotency or cost.

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?

A single dense sentence that front-loads the core operation and the non-model guarantee, then lists the checks compactly. No filler, no repetition.

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 enumeration of defect classes partially substitutes for a missing output schema by telling the agent what kinds of violations can be reported. But with no annotations, no output schema, and an undocumented parameter, the definition should also say what the return looks like (boolean vs. violation list) and what 'id' refers to. It is adequate but leaves real gaps for a validation tool an agent must interpret results from.

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?

There is one required parameter 'id' with 0% schema description coverage, so the description is the only source of meaning — and it never clarifies whether 'id' is the workflow id or a node id. The repeated use of 'id' inside the check list (duplicate ids, illegal id characters) actively muddies that distinction. The implied reading is the workflow being validated, but it is left to inference.

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 states a specific verb+resource (deterministic structural validation of a workflow) and enumerates the exact defect classes it detects (duplicate ids, illegal characters, dangling/self dependencies, gate reference errors, cycles). This clearly separates it from execution siblings like run_workflow or workflow_status, though it does not name an alternative outright.

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?

The parenthetical '(no model calls)' implies this is a cheap pre-flight check usable before running a workflow, which is useful implied guidance. However, there is no explicit when-to-use or when-not-to-use statement, no mention of prerequisites (does the workflow need to exist or be in a draft state?), and no routing to a sibling such as run_workflow or get_workflow.

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