Skip to main content
Glama

add-cell-of-shape

Add a shape to a Draw.io diagram by specifying its name, position, dimensions, text content, and visual style. This tool enables AI agents to programmatically insert diagram elements for creating architectural diagrams, flowcharts, and visualizations.

Instructions

This tool allows you to add new vertex cell (object) on the current page of a Draw.io diagram by its shape name. It accepts multiple optional input parameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shape_nameYesName of the shape to retrieved from the shape library of the current diagram.
xNoX-axis position of the vertex cell of the shape
yNoY-axis position of the vertex cell of the shape
widthNoWidth of the vertex cell of the shape
heightNoHeight of the vertex cell of the shape
textNoText content placed inside of the vertex cell of the shape
styleNoSemi-colon separated list of Draw.io visual styles, in the form of `key=value`. Example: `whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;`
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'adds' a vertex cell, implying a write/mutation operation, but doesn't mention permissions, side effects, error conditions, or what happens on success (e.g., returns cell ID). It lacks critical context like whether this modifies the diagram immediately, requires save operations, or has rate limits. The description is minimal beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core functionality upfront. It avoids redundancy and unnecessary elaboration. However, it could be slightly more structured by separating purpose from parameter notes, but it remains appropriately concise for the tool's complexity.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like what happens after addition (e.g., returns cell ID, triggers updates), error handling, or prerequisites (e.g., requires an open diagram). Given the tool's complexity (7 parameters, write operation), more context is needed to guide effective use.

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 fully documents all 7 parameters. The description adds no parameter-specific information beyond noting they are 'multiple optional input parameters' (which is evident from the schema). It doesn't explain parameter interactions, dependencies, or provide examples beyond what's in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('add new vertex cell'), target resource ('on the current page of a Draw.io diagram'), and mechanism ('by its shape name'). It distinguishes from siblings like 'add-rectangle' (specific shape) and 'add-edge' (different element type), though it doesn't explicitly contrast with them. The purpose is specific but could be more precise about what distinguishes it from other shape-adding tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'add-rectangle' or 'add-edge'. The description mentions 'multiple optional input parameters' but doesn't explain when specific parameters are needed or what scenarios this tool is best suited for. Usage is implied only through the tool name and basic functionality.

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/lgazo/drawio-mcp-server'

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