Skip to main content
Glama

Validate the diagram

validate_diagram

Checks BPMN diagrams for XML validity, metamodel compliance, reference and scope errors, diagram completeness, bpmn-js reimport warnings, and bpmnlint rule violations; returns a detailed report.

Instructions

Checks the diagram and returns a report. Six checks: the XML is well formed; every element and attribute exists in the BPMN 2.0 metamodel; references resolve, ids are unique and each flow stays in its scope (sequence flows inside their process, message flows between two pools); every element is drawn (diagram interchange complete); bpmn-js reimports the document without warnings; the recommended bpmnlint rules raise no error (isolated element, missing start or end event, element without a label, superfluous gateway…). Returns the element counts, each check with its problems, the number of errors and warnings, and the bpmnlint issues with the id of the element concerned, the rule and the message.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "validate_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/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 well: "checks... and returns a report" plus the explicit list of non-mutating inspections makes clear this is a read-only diagnostic. It also discloses the exact return payload (element counts, per-check problems, error/warning counts, bpmnlint issues with element id, rule and message). It does not explicitly state that the diagram is left unmodified, which is the one small gap.

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?

Front-loaded with the one-line purpose, then the six checks, then the return shape, in a logical order. The enumeration is dense but each clause names a distinct check, so little is wasted; the parenthetical rule examples add slight bulk without harm.

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?

There is no output schema, so the description must describe the return value and it does so thoroughly, down to the fields of each bpmnlint issue. With zero parameters and a simple input contract, nothing an agent needs to invoke and interpret this tool is missing.

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?

The tool takes zero parameters, so there is nothing to disambiguate; baseline 4 applies. The description correctly spends no words on parameter syntax.

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?

States a specific verb and resource ("Checks the diagram and returns a report") and then enumerates the six concrete checks performed, so an agent knows exactly what this tool does and how it differs from siblings like get_process_report or get_diagram_xml.

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 by the nature of a validation tool; the description never says when to call it (e.g. before export or after set_diagram_xml) or how it relates to sibling tools such as get_process_report. The context is inferable but not stated.

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