Skip to main content
Glama

generate_plantuml_diagram

Generate PlantUML diagrams with syntax validation and error reporting. Returns embeddable image URLs for valid diagrams or structured error details for automatic correction.

Instructions

Generate a PlantUML diagram with automatic syntax validation and error reporting for auto-fix workflows. Returns embeddable image URLs for valid diagrams or structured error details for invalid syntax that can be automatically corrected. Optionally saves the diagram to a local file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
plantuml_codeYesPlantUML diagram code. Will be automatically validated for syntax errors before generating the diagram URL.
formatNoOutput image format (SVG or PNG)svg
output_pathNoOptional. Path to save diagram locally. Automatically creates all necessary parent directories. Restricted to current working directory by default. Set PLANTUML_ALLOWED_DIRS env var (colon-separated paths, or "*" for unrestricted) to allow additional directories. Only .svg and .png extensions permitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A4.2/5.0
Behavior4/5

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

Despite having no annotations, the description discloses key behaviors: automatic syntax validation, return of embeddable URLs or structured errors, and optional local file saving. It doesn't detail side effects like overwriting files or permission requirements, but it covers the main behavioral traits.

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?

Two sentences, no filler, front-loaded with the main action and key differentiator.

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?

With a moderate number of parameters and no output schema, the description explains the return types (URLs or error details) and optional side effect (file saving). It's sufficient for an agent to understand inputs and outputs.

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?

Input schema covers 100% of parameters with descriptions, so baseline is 3. The description adds no significant parameter details beyond the schema, though it reiterates the auto-validation behavior for plantuml_code.

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 uses a specific verb ('Generate') and resource ('PlantUML diagram') and clearly distinguishes from sibling tools like decode_plantuml/encode_plantuml by adding automatic syntax validation and error reporting.

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

Usage Guidelines4/5

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

States the tool is for 'auto-fix workflows' and describes its typical use of generating diagrams with validation. It doesn't explicitly name alternatives, but the description implies when to use it versus other PlantUML utilities.

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