Skip to main content
Glama

generate_diagram_from_json

Convert JSON data into visual diagrams to illustrate API responses, database schemas, dependency trees, or configuration files. Generate flowcharts, ERDs, system architectures, and other diagram types from structured JSON input.

Instructions

Generate a diagram from a JSON structure. Use this tool when the user wants to visualise JSON data such as API responses, database schemas, dependency trees, configuration files, or any structured data. Pass the raw JSON string as content. Returns a link to view and edit the generated diagram in the browser.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesA JSON string representing the structure to visualise. This can be API response data, a database schema, a config file, dependency tree, or any other structured JSON. Example: '{"users": [{"id": 1, "orders": [{"id": 101}]}]}'
promptNoInstruction for how to interpret or render the JSON. Example: "Show as an entity relationship diagram with cardinality labels"
diagramTypeNoPreferred diagram type. Defaults to 'erd' for schemas and 'flowchart' for other JSON.
isIconEnabledNoSet to true when the user asks to include icons in the diagram.
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that the tool returns 'a link to view and edit the generated diagram in the browser,' which is useful output information. However, it lacks details on potential limitations (e.g., JSON size constraints), error handling, or performance characteristics that would be helpful for an agent.

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 efficiently structured in two sentences: the first states the purpose and usage context, and the second covers the key parameter and return value. Every sentence adds essential information without redundancy, making it easy to parse and front-loaded with critical details.

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 tool with 4 parameters, 100% schema coverage, and no output schema, the description is reasonably complete. It covers the tool's purpose, usage context, main parameter, and return value. However, it could be more comprehensive by addressing potential behavioral aspects like error cases or limitations, given the lack of annotations.

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 thoroughly. The description adds minimal value beyond the schema by mentioning the 'content' parameter in context, but it doesn't provide additional semantic insights or usage examples for parameters like 'prompt' or 'diagramType' that aren't already in the schema descriptions.

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 specific action ('Generate a diagram from a JSON structure') and distinguishes it from sibling tools by specifying the input type (JSON) rather than ASCII, image, Mermaid, or text. It provides concrete examples of use cases like API responses and database schemas.

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?

The description explicitly states when to use this tool: 'when the user wants to visualise JSON data such as API responses, database schemas, dependency trees, configuration files, or any structured data.' This clearly differentiates it from sibling tools that handle other input formats, providing direct guidance on appropriate contexts.

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/erajasekar/ai-diagram-maker-mcp'

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