Skip to main content
Glama

Lint Mermaid

diagram_lint

Check Mermaid diagrams against readability budgets for node count, depth, cycles, edge labels, and label length to flag overly complex architecture views before review.

Instructions

Check a Mermaid diagram against readability budgets (node count, depth, cycles, edge labels, label length).

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": {
      "mermaid": "<mermaid>"
    },
    "name": "diagram_lint"
  }
}

Input Schema

NameRequiredDescriptionDefault
mermaidYes
max_nodesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the specific dimensions being evaluated, which is meaningful behavioral content and implies a non-mutating analysis, but it says nothing about the response shape, whether violations are reported as findings or errors, or how budgets are defaulted.

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?

A single front-loaded sentence with a tight parenthetical enumeration of the checks; there is no filler or redundant restatement of the title.

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

Completeness2/5

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

With no annotations and no output schema, the description should explain what a run returns (pass/fail, list of budget violations) and how max_nodes interacts with the built-in budgets. It omits both, so an agent cannot fully anticipate the result of invoking it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for the two parameters. It only indirectly hints at a node-count budget and never explains what max_nodes does, that it overrides the default budget, or what its bounds mean, leaving the agent to infer parameter behavior from the schema alone.

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 ('Check') and resource ('a Mermaid diagram') and enumerates the exact budgets examined (node count, depth, cycles, edge labels, label length), so the agent knows precisely what the tool returns judgement on. It does not explicitly distinguish itself from render/export siblings, which keeps it below a 5.

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?

There is no statement of when to call this versus alternatives such as diagram_render or arch_diagram, and no preconditions or exclusions are given. Usage is only inferable from the word 'Check', which is not real guidance.

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