Skip to main content
Glama

render_diagram

Idempotent

Renders the current model as an SVG stock-and-flow diagram, with auto-layout applied by default. Optionally writes the SVG to a specified file.

Instructions

Render the current model as an SVG stock-and-flow diagram. The SVG is returned inline (for clients without file access) and optionally written to a file. Defaults to running auto-layout first so freshly built models render sensibly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filepathNoOptional output path (.svg); parent directory must exist
model_idNoSession-scoped model ID. Optional; defaults to the current model for this session.
auto_layoutNoRun auto-layout before rendering (same semantics as save_model)
workspace_idNoOpaque application workspace handle. Required by MCP 2026-07-28 clients; supported legacy stdio clients may omit it to use the process-local compatibility workspace.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
svgYes
layoutYes
filepathYes
model_idYes
Behavior4/5

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

Annotations declare non-read-only and idempotent, and the description adds behavioral details: returns SVG inline, may write to a file, and defaults to auto-layout. These specifics go beyond the annotation values and provide useful context about side effects and layout behavior. No contradiction with annotations.

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 two sentences long, front-loaded with the primary purpose, and every sentence adds meaningful context. No redundant or filler content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and all parameters documented in the input schema, the description covers the essential aspects: what it does, output modes, and auto-layout behavior. It is complete for a rendering tool and does not need to explain return values.

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?

The input schema provides 100% coverage with descriptions for all four parameters, so the description does not need to elaborate much. It mentions file output and auto-layout conceptually, but does not add per-parameter details beyond what the schema already offers. Baseline 3 is appropriate given high schema coverage.

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 renders the current model as an SVG stock-and-flow diagram, specifying the output format and distinguishing itself from siblings like save_model or get_model_xml. The verb 'render' and resource 'model' are specific, and the SVG output makes the purpose unambiguous.

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 gives clear context: use when a visual SVG diagram is needed, with inline output for clients lacking file access and optional file writing. It mentions auto-layout for fresh models but does not explicitly name alternative tools or exclusion scenarios. Overall, the usage context is clear.

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/bradleylab/stella-mcp'

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