Skip to main content
Glama

Check sequence diagram text

check_sequence
Read-onlyIdempotent

Use this when the user wants sequence diagram text checked without a drawing, for example "check my sequence diagram for unclosed blocks" or "which participants have no messages". Takes the same diagram text as make_sequence_diagram. Returns ready true or false; when a line breaks the grammar, the line number, the token and the reason; otherwise the participants with outgoing and incoming message counts, message counts by kind, the blocks with their lines, nesting depth and messages, activate lines with no deactivate, and participants that differ only in upper and lower case. Does not draw the diagram or make files, and does not read features of other diagram languages outside this grammar.

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": {
      "diagram": "<diagram>"
    },
    "name": "check_sequence"
  }
}

Input Schema

NameRequiredDescriptionDefault
diagramYesThe diagram in this line grammar, one statement per line, up to 60,000 characters: participant Name | actor Name | participant "Long Name" as Alias; A -> B: text (sync call), A ->> B: text (async), A --> B: text (reply), A -> A: text (self); note over A: text | note over A,B: text; alt condition / else condition / end, loop condition / end, opt condition / end; activate A | deactivate A; lines starting with # or %% are comments. Example: "actor User\nUser -> Web: Log in\nWeb -> DB: Find user\nDB --> Web: User row\nalt password ok\nWeb --> User: Welcome\nelse wrong password\nWeb --> User: Try again\nend".

Output Schema

NameRequiredDescriptionDefault
errorYes
notesYes
readyYes
shownNo
blocksYes
countsNo
limitsYes
grammarYes
activationsYes
participantsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered; the description adds real behavioral detail about what the check reports (ready true/false, offending line number, token and reason, counts, blocks, dangling activate lines, case-colliding participants). The enumeration of return fields partly duplicates the output schema, which keeps it from a 5, but the validation semantics are genuine added context.

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?

Usage guidance is front-loaded and every sentence is load-bearing. The third sentence is a long run-on list of return fields that a reader must parse carefully, and since an output schema exists some of that list is lower-value, but there is 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 single-parameter, read-only validator with an output schema and full annotation coverage, the description supplies the trigger conditions, input provenance, error-reporting behavior and explicit non-goals. Nothing an agent needs in order to select or call it correctly is missing.

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?

Schema description coverage is 100% and the single 'diagram' parameter is fully documented in the schema itself. The description adds one useful thing beyond it: that the parameter takes the same diagram text as make_sequence_diagram, letting an agent pass output between the two tools without re-deriving the format.

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?

The description opens with a specific verb and resource ('sequence diagram text checked') and immediately frames the scope as validation 'without a drawing', which separates it from the sibling make_sequence_diagram. The quoted user phrasings ('check my sequence diagram for unclosed blocks') make the intended task unmistakable.

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

Usage Guidelines5/5

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

It gives explicit triggering conditions with example user requests, states the input is the same text as make_sequence_diagram, and closes with exclusions ('does not draw the diagram or make files, and does not read features of other diagram languages'). That effectively routes the agent away from the drawing tool and from other diagram grammars.

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