Skip to main content
Glama

Flowchart From Text — Text-to-Mermaid Flowchart Generator

Validate and analyze Mermaid diagram syntax

validate_mermaid_diagram
Read-onlyIdempotent

Deterministically lint and analyze Mermaid diagram syntax (flowchart, sequence, ER, Gantt, mindmap, state). Detects diagram category, counts nodes and edges, and reports line-level structural syntax issues.

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": {
      "source": "<source>"
    },
    "name": "validate_mermaid_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesMermaid diagram source code to validate and analyze (e.g. "flowchart TD\n A[Start] --> B[End]").

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, closed-world behavior, so the description only needs to add context. It does: 'deterministically' signals repeatable results, and it enumerates exactly what the analysis surfaces (category detection, node/edge counts, line-level structural issues). What it does not say is that issues are reported rather than thrown, or that it never rewrites the source.

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?

Two sentences with no filler, front-loaded with the core action and immediately scoped by the parenthesized diagram list. The second sentence is somewhat dense with three comma-separated outputs, but every clause carries information.

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 one-parameter read-only tool with full schema coverage, the description supplies the supported diagram types and the shape of the analysis output, which substitutes for the absent output schema. Missing only a note on failure semantics, i.e. whether invalid diagrams return issues or errors.

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 parameter with 100% schema description coverage, including a concrete inline example of flowchart syntax. The description adds no syntax, format, or size constraints beyond what the schema already states, so the baseline 3 applies.

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 gives a specific verb pair (lint/analyze) and resource (Mermaid diagram syntax), names the six supported diagram families, and previews the three outputs. It is unambiguous that this is a static checker rather than a generator, though it never explicitly contrasts itself with the sibling text_to_mermaid_flowchart.

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: an agent can infer this is the tool for checking existing diagram source, and 'deterministically lint' hints at a pre-render check. There is no explicit when-to-use statement, no when-not-to-use exclusion, and no mention of the sibling generator as an alternative.

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