Check Diagram Source
validate_umlValidates diagram type, syntax, and format locally without rendering, returning errors, warnings, suggestions, and diagnostics. Enable strict checks for extra Mermaid/D2 validation.
Instructions
Validate diagram type, format, and syntax locally (no render). Returns valid, errors, warnings, suggestions, and diagnostics; prepared_code is normalized source and changes explains normalization. Set strict=true for extra Mermaid/D2 checks.
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": {
"diagram_type": "<diagram_type>",
"code": "<code>"
},
"name": "validate_uml"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Diagram source code to validate locally without rendering. | |
| strict | No | Enable additional syntax checks when supported. | |
| diagram_type | Yes | Catalog key selecting the source language and renderer to check. | |
| output_format | No | Output format whose compatibility should be checked. | svg |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| errors | No | ||
| strict | No | ||
| backend | No | ||
| changes | No | ||
| warnings | No | ||
| normalized | No | ||
| diagnostics | No | severity, code, message, line, column, suggestion. | |
| suggestions | No | ||
| diagram_type | No | ||
| prepared_code | No | ||
| corrected_code | No |