Skip to main content
Glama

Generate a diagram

generate_diagram

Generate shareable architecture diagrams from natural language or source code (Terraform, docker-compose, Kubernetes, SQL, Mermaid, PlantUML) and receive a diagram ID for later edits.

Instructions

Generate a draw.io-style diagram with draft1.ai from a natural-language description or from source code (Terraform, docker-compose, Kubernetes, SQL, Mermaid, PlantUML). Returns a shareable URL plus a diagram_id for follow-up edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoType of the input. Defaults to "auto" (the API detects the input type).
promptYesWhat to diagram: a plain-English description (e.g. 'a web app with a load balancer, two app servers and a postgres db') or raw source code pasted verbatim.
Behavior4/5

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

With no annotations provided, the description conveys key behavioral aspects: it creates a diagram, accepts various source formats, and returns a URL plus diagram_id. It does not disclose potential side effects like resource consumption or rate limits, but for a generation tool, the core behavior is disclosed.

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?

The description is compact and front-loaded. The first sentence states the primary action and input types; the second explains the output and follow-up capability. No unnecessary words or repetition.

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?

Given the absence of an output schema, the description appropriately explains what is returned (shareable URL and diagram_id). It covers input formats and hints at subsequent editing. It lacks error-handling or authentication details, but these are not critical for a generation tool and the description is fairly complete.

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 coverage is 100%, so the schema already documents both parameters well. The description adds context about input types and the auto-detection default, but this largely reinforces what the enum descriptions already convey. No significant additional parameter semantics are needed.

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 clearly states the tool generates diagrams from natural language or source code, specifying the output (shareable URL + diagram_id) and hinting at the sibling tool for follow-up edits. It distinguishes itself well from edit_diagram.

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?

The description states the input types (natural-language description or source code formats) and mentions that the returned diagram_id is for follow-up edits, implying when to use edit_diagram instead. However, it does not explicitly state when not to use this tool or provide direct alternative comparisons.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abdelhadi-azouni/draft1-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server