Skip to main content
Glama

Validate editable diagram geometry

validate_diagram_scene
Read-onlyIdempotent

Validate diagram scene JSON for supported nodes, text, and bound connectors. It rejects duplicate IDs, dangling references, unsupported styles, and invalid XML characters, returning counts without silent repairs.

Instructions

Validate scene JSON for supported nodes, text and bound connectors. Reject duplicate IDs, dangling references, unsupported styles and invalid XML characters. Returns counts without silently repairing or re-laying out the scene. Max 32 KiB and 200 elements.

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": {
      "scene": "<scene>"
    },
    "name": "validate_diagram_scene"
  }
}

Input Schema

NameRequiredDescriptionDefault
sceneYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered elsewhere. The description adds genuine value with "returns counts without silently repairing or re-laying out the scene" and the 32 KiB / 200 element caps, telling the agent that a failed validation leaves the input unchanged. It stops short of saying what the returned counts or rejection reasons look like.

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?

Four short sentences, each earning its place, with scope first and limits last. No repetition of the title and no filler.

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?

For a read-only validator with a deeply nested but undocumented schema and no output schema, the description covers purpose, enforcement rules, side-effect stance, and size limits. What remains vague (the shape of the returned counts) is a return-value detail rather than something needed to call the tool correctly.

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?

With a single parameter at 0% schema description coverage, the description must carry the meaning, and it does: it names the three element families (nodes, text, bound connectors) and states the 200 element / 32 KiB ceiling, which the schema only partially encodes via maxItems. The rejection list (duplicate IDs, dangling references, unsupported styles, invalid XML characters) explains what the deep nested schema's patterns and enums are actually enforced for.

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 opens with a specific verb and resource ("Validate scene JSON") and enumerates the validated content: nodes, text, and bound connectors. That is enough to distinguish it from create_flowchart_scene and export_drawio, though it never explicitly contrasts itself with them.

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: the description makes clear this is a pre-flight check that rejects bad input without repairing it, so an agent can infer it belongs before export. There is no explicit when-to-use/when-not statement and no named alternative for the case where the scene fails validation.

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