Skip to main content
Glama

Revisar sintaxis Mermaid

mermaid-check
Read-onlyIdempotent

Revisa de forma básica un diagrama Mermaid sin renderizarlo: tipo de diagrama y dirección válidos, corchetes y comillas balanceados por línea, pares subgraph/end y loop/alt/opt/par…end, y aristas con destino. No es un analizador completo. Cuándo: hay que leer, construir o revisar con exactitud una URL, una cabecera HTTP, un token, una versión, un rango de IP, un documento HTML o Markdown o un archivo para agentes. No para: revisar de forma básica un texto DOT de Graphviz sin renderizarlo (dot-check). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Sanity-checks Mermaid diagram text without rendering it: known diagram type and direction, balanced brackets and quotes per line, subgraph/end and block (loop/alt/opt/par) pairing, and flowchart edges with a target. Not a full parser. [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
textYesMermaid source (string; required).

Output Schema

NameRequiredDescriptionDefault
validNo
issuesNo
diagram_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / examples
      Added value: +[
      +  "flowchart LR\n  A[Pedido] --> B{¿Pagado?}\n  B -->|sí| C[Enviar]\n  subgraph Bodega\n    C --> D\n  end"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Sanity-checks Mermaid diagram text without rendering it: known diagram type and direction, balanced brackets and quotes per line, subgraph/end and block (loop/alt/opt/par) pairing, and flowchart edges with a target. Not a full parser. When: a URL, HTTP header, token, version string, IP range, HTML or Markdown document or agent-readiness file has to be parsed, built or checked exactly. Not for: sanity-checking Graphviz DOT text without rendering (dot-check). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/openWorldHint=false, so the safety profile is covered; the description still adds real value with 'no rendering', 'not a full parser', determinism, and explicit limits (64 KB input, 1 s per call, 1 MB result). One caveat: the stated 64 KB input cap conflicts with the schema's maxLength of 262144, which could confuse an agent on large inputs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the check list are front-loaded and earn their space. But the copied 'Cuándo' enumeration of URLs/tokens/IP ranges is pure waste and actively harmful, and the trailing '[EN completo / full EN: inputSchema.description]' pointer is redundant meta-text rather than content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-string, low-complexity validator with an output schema present, the description covers scope, the non-parser caveat, determinism, and limits — enough to call it correctly. The only substantive hole is trustworthy when-to-use guidance, which is filled with irrelevant content instead.

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?

There is a single required parameter with 100% schema description coverage plus a worked example embedded in the schema, so the baseline is already high. The description adds nothing about the 'text' parameter specifically, but nothing is missing at this parameter count.

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 ('Revisa de forma básica un diagrama Mermaid sin renderizarlo') and then enumerates exactly what is checked: diagram type/direction, bracket/quote balance per line, subgraph/end and loop/alt/opt/par pairing, and edges with a target. It also explicitly bounds scope ('No es un analizador completo') and names the sibling it is not (dot-check), so an agent can distinguish it without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'No para' exclusion against dot-check is genuinely useful routing. However, the 'Cuándo' clause is boilerplate that does not match this tool at all — it lists URLs, HTTP headers, tokens, version strings, IP ranges, HTML/Markdown documents — so the only positive usage guidance present actively misleads an agent about when to invoke mermaid-check.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources