Skip to main content
Glama

open_diagram

Open a specific Mermaid block from a Markdown file in Mermaid.ai's shared scratch diagram, replacing its current content. Use after listing diagrams to select by ID or index.

Instructions

Open one linked Mermaid block in the shared Mermaid.ai scratch diagram.

This changes the shared scratch diagram. Provide exactly one of block_id or block_index, normally after calling list_diagrams.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
block_idNoStable Mermaid block id from list_diagrams. Provide exactly one of block_id or block_index.
documentYesAbsolute or user-expanded path to a .md / .markdown file.
block_indexNo1-based index of the Mermaid block in the document. Provide exactly one of block_id or block_index.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries the behavioral transparency burden. It does disclose the key side effect ('This changes the shared scratch diagram'), but it does not explain the nature of the change (e.g., overwriting vs. appending), reversibility, or required permissions. This is adequate but leaves gaps.

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, front-loaded with the action and resource, followed by the side effect and usage rule. Every sentence contributes essential information with no redundant fluff.

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, side effect, parameter selection, and a usage prerequisite, while the output schema handles return values. It does not mention exclusions or alternative tools, but for this relatively simple tool with rich schema context, it is largely 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 description coverage is 100%, so the schema itself already explains block_id, block_index, and document. The description text adds the selection rule (exactly one) and the prerequisite relationship to list_diagrams, but these are also partially embedded in the parameter descriptions. This meets the baseline for high schema coverage without adding much beyond it.

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 ('Open') and resource ('one linked Mermaid block in the shared Mermaid.ai scratch diagram'), clearly differentiating this tool from siblings like list_diagrams and sync_document. It also states the side effect ('This changes the shared scratch diagram') to reinforce the action.

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 explicitly says to provide exactly one of block_id or block_index and that this is 'normally after calling list_diagrams', giving clear usage guidance and a prerequisite. It does not explicitly state when not to use the tool or name alternatives, so it stops short of a 5.

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/Async23/mermaid-ai-links'

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