Skip to main content
Glama

validate_diagram

Read-onlyIdempotent

Checks diagram specs before rendering, verifying icon IDs with suggestions, references, nesting, and limits to catch errors early.

Instructions

Check a spec without rendering: icon ids (with suggestions), references, nesting, limits.

Input Schema

NameRequiredDescriptionDefault
specYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, closed-world semantics, so the description's job is to say what actually happens. It does: the check covers icon ids (with suggestions), references, nesting, and limits, which tells the agent the validation is deep and non-mutating rather than a shallow schema check.

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?

One sentence, no filler, with the most decisive constraint ('without rendering') placed early. Every clause maps to a distinct check category.

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?

An output schema exists, so return values needn't be explained, and annotations cover safety. However, for a validation tool operating on a deeply nested diagram spec with many constraints, the description leaves open whether the tool returns only errors, also suggestions/repairs, and whether a valid spec can then be fed to the generator unchanged.

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 a single top-level parameter 'spec' with no description (0% top-level coverage), though the nested DiagramSpec/$defs fields carry their own rich descriptions. The description adds scope information about which aspects of the spec are validated ('references, nesting, limits'), but does not clarify the shape of the argument itself or whether an invalid spec still needs to be structurally valid.

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?

'Check a spec without rendering' names a specific verb (check/validate) and resource (diagram spec), and the 'without rendering' clause implicitly distinguishes it from generate_architecture_diagram. It stops short of naming the sibling explicitly, so an agent must infer the pairing.

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 phrase 'without rendering' implies this is the dry-run/pre-flight step before generation, but the description never states when to call it, whether it should precede generate_architecture_diagram, or what to do with a failing result. Usage is implied rather than prescribed.

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