Skip to main content
Glama

add_canvas_elements

Add shapes, text, arrows, and other elements directly to an Excalidraw .canvas.md file, enabling AI assistants to build or update canvas diagrams with planned coordinates and spacing.

Instructions

Add shapes, text, arrows, and other elements to an Excalidraw canvas file. Writes directly to the .canvas.md file on disk. IMPORTANT: Plan sections first — allocate vertical space per section (120-200px each), leave 100-140px gaps between sections, max 3-4 items per row. Use POSITIVE coordinates starting from (0,0), build rightward/downward. Leave 60-80px gaps between elements. Keep text SHORT (max ~30 chars, 1-3 words for shape labels). Use clear_canvas first if redrawing. Call get_canvas_guide first to learn the element format.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace": "<workspace>",
      "canvasPath": "<canvasPath>",
      "elements": "<elements>"
    },
    "name": "add_canvas_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
elementsYesArray of elements to add to the canvas
workspaceYesWorkspace path or name
canvasPathYesCanvas file path relative to workspace (e.g., "documents/my-drawing.canvas.md")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose the key behavioral trait: it is a persistent disk write to the .canvas.md file. It also discloses layout constraints that affect correctness. It does not say whether new elements append to existing content or replace it, nor what happens on invalid coordinates, which leaves a gap for a mutation tool.

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?

Purpose is front-loaded in the first sentence and the imperative style keeps rules scannable. The layout constants (120-200px, 100-140px, 60-80px) are dense but each supports correct invocation, though the block runs long and mixes coordination steps with layout heuristics.

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 3-parameter, fully documented schema with no output schema, the definition covers prerequisites, coordinate conventions, and spatial planning. The main omission, append-versus-replace semantics for existing canvas content, is the one thing an agent might still get wrong.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description exceeds that by adding meaning the schema lacks: coordinates should be positive and built rightward/downward from (0,0), text should stay under ~30 chars, and elements need 60-80px separation. It says nothing extra about workspace or canvasPath, which are adequately covered by the schema.

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?

States a specific verb and resource ('Add shapes, text, arrows... to an Excalidraw canvas file') plus the concrete effect ('Writes directly to the .canvas.md file on disk'), which distinguishes it from read_canvas and clear_canvas at a glance.

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?

Explicitly names alternatives and their triggering conditions: 'Call get_canvas_guide first to learn the element format' and 'Use clear_canvas first if redrawing.' It also supplies the planning steps (allocate vertical space, gap sizes, max items per row) that must precede a good call.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.