Skip to main content
Glama

Generate Uml Diagram Tool

generate-uml-diagram

Use this when the user supplies source code and asks for UML, Mermaid, sequence, class, component, or architecture diagrams. After authorization, this state-changing generation consumes AI credits, creates a generation, and can save markdown to a Space. Public Spaces expose saved diagrams. Use browser guidance for local uploads or full-repository diagrams.

Input Schema

NameRequiredDescriptionDefault
nameNoOptional generation name.
filenameYesFilename for the source code.
source_codeYesSource code to analyze.
diagram_typeYesClass Diagrams, Sequence Diagrams, Use Case Diagrams, Activity Diagrams, Component Diagrams, State Diagrams, or Object Diagrams.
save_to_spaceNoOptional destination Space item.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond annotations, the description discloses critical behavioral traits: it is state-changing, consumes AI credits, creates a generation, can save markdown to a Space, and notes that public Spaces expose saved diagrams. It also mentions authorization is required.

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?

Four sentences, front-loaded with the primary use case, then behavioral context, then save behavior, then alternative guidance. Every sentence contributes necessary information without redundancy.

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?

The description covers purpose, usage, side effects, cost, and save behavior well. However, it does not mention what the tool returns (e.g., a generation ID or URL) which would help an agent know how to access the result, given the absence of an output schema.

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?

Schema description coverage is 100%, so the schema already documents all parameters. The description reinforces the diagram types but adds no new parameter-level meaning beyond what the schema provides.

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 specifies the verb 'generate' and the resource 'UML diagram', and lists supported diagram types (UML, Mermaid, sequence, class, component, architecture). This clearly distinguishes it from sibling generate-* tools that produce documentation, tests, or comments.

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 explicitly states when to use: 'when the user supplies source code and asks for UML... diagrams.' It also provides a when-not/alternative: 'Use browser guidance for local uploads or full-repository diagrams,' covering edge cases where this tool is not appropriate.

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.