Skip to main content
Glama

generate_sequence_diagram

Generate a sequence diagram from a natural language description of an interaction flow. Produces Mermaid, PlantUML, or python_diagrams code with an optional custom title.

Instructions

Generate a sequence diagram from a natural language description.

Args:
    description: Natural language description of the interaction flow
                Example: "User logs in, system validates credentials, database returns user data"
    output_format: Output format - "mermaid", "plantuml", or "python_diagrams" (default: "mermaid")
    title: Optional custom title for the diagram

Returns:
    Dictionary with generated diagram code and metadata

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": {
      "description": "<description>"
    },
    "name": "generate_sequence_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNo
descriptionYes
output_formatNomermaid

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose that the result is a dictionary containing diagram code and metadata, but says nothing about whether generation is deterministic, whether it relies on an external model, failure behavior on unparseable descriptions, or any side effects.

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?

The purpose statement is front-loaded in a single clear sentence, followed by a conventional Args/Returns block. The Args details earn their place since the schema carries no descriptions; the Returns line is slightly redundant given the output schema exists.

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 three-parameter generator with an output schema, the description covers inputs and outcome adequately, and the enum of output formats fills the biggest structured-data gap. It stops short of describing runtime prerequisites, which is the main missing piece.

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 coverage is 0%, so the description must compensate and largely does: it explains what the description parameter expects with a concrete example, and — critically — enumerates the accepted output_format values (mermaid, plantuml, python_diagrams) which appear nowhere in the schema. Only minor gaps remain, such as behavior on an unsupported format string.

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 first sentence gives a specific verb (Generate) and resource (sequence diagram) plus the input modality (natural language description). That distinguishes it well from generate_class_diagram and generate_flowchart by artifact type, though it never explicitly contrasts itself with siblings.

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: the parameter example ("User logs in, system validates credentials, database returns user data") indirectly signals that this tool is for interaction/flow narratives. There is no explicit when-to-use, when-not-to-use, or pointer to convert_diagram_format for post-processing.

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