Skip to main content
Glama

add-rectangle

Add a rectangle shape to Draw.io diagrams by specifying position, size, text, and visual style parameters for diagram creation and modification.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoX-axis position of the Rectangle vertex cell
yNoY-axis position of the Rectangle vertex cell
widthNoWidth of the Rectangle vertex cell
heightNoHeight of the Rectangle vertex cell
textNoText content placed inside of the Rectangle vertex cellNew Cell
styleNoSemi-colon separated list of Draw.io visual styles, in the form of `key=value`. Example: `whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;`whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'add new Rectangle vertex cell' which implies a write/mutation operation, but doesn't mention permissions, side effects (e.g., if it modifies existing cells), error conditions, or what happens on success (e.g., returns a cell ID). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 concise with two sentences that directly state the tool's purpose and parameter nature. It's front-loaded with the core action, though the second sentence about 'multiple optional input parameter' is somewhat redundant given the schema. Overall, it's efficient with minimal waste.

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?

Given the complexity of a mutation tool (adding graphical elements) with no annotations and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., what the tool returns, error handling), usage context relative to siblings, and doesn't compensate for the absence of structured output details, making it inadequate for confident agent invocation.

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%, with each parameter (x, y, width, height, text, style) well-documented in the schema. The description adds no additional meaning beyond stating 'multiple optional input parameter', which is already evident from the schema's optional nature and parameter count. Baseline score of 3 is appropriate as the 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 Rectangle vertex cell') and resource ('on the current page of a Draw.io diagram'), which is specific and actionable. However, it doesn't differentiate this tool from sibling tools like 'add-cell-of-shape' or 'add-edge', which likely perform similar diagram modifications, leaving some ambiguity about when to choose this specific rectangle tool.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'multiple optional input parameter' but doesn't specify prerequisites, context (e.g., must have a diagram open), or compare it to siblings like 'add-cell-of-shape' for other shapes or 'edit-cell' for modifications, leaving the agent to guess based on tool names alone.

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