Skip to main content
Glama

Add a region

canvas_add_region

When: Use after the final layout to mark nodes that belong together without moving them into a zone. Regions do not move with layout.

Draw a labelled translucent area behind existing nodes to show they belong together, without reparenting them. Use this when the grouping is a reading aid rather than real containment, when areas would need to overlap, or when a node belongs to two ideas at once — canvas_group_nodes cannot express any of those because it moves nodes into the zone. Call canvas_measure_canvas first and size the region to enclose the nodes with roughly 24px of margin.

Batch: regions (up to 12) takes a list; put every item in one call rather than one call per item.

Operates on one Datadef diagram, named by diagram_id.

Returns compact JSON: the ids it created, changed or removed, the diagram revision, a one-line summary and the next step. A viewer-role account is refused.

Next: canvas_view to check the result.

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": {
      "diagram_id": "<diagram_id>",
      "regions": "<regions>"
    },
    "name": "canvas_add_region"
  }
}

Input Schema

NameRequiredDescriptionDefault
regionsYes
diagram_idYesDiagram id, from list_diagrams, create_diagram or create_blank_diagram.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / diagram_id / description
      Previous value: -"Canvas id, from list_diagrams, create_diagram, or create_blank_diagram."New value: +"Diagram id, from list_diagrams, create_diagram or create_blank_diagram."
    • changedInput schema / properties / regions / items / properties / color / description
      Previous value: -"Hex fill, drawn translucent. Default a neutral slate."New value: +"Colour name or hex, drawn translucent. Default a neutral slate."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover the safety profile (not read-only, not idempotent, not destructive); the description adds the genuinely non-obvious behaviours: regions do not move with subsequent layout, viewer-role accounts are refused (auth), and it discloses the shape of the return payload despite there being no output schema. This goes well beyond what the structured fields provide.

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?

Labelled sections (When / Batch / Next) make it scannable and the guiding constraint is front-loaded. It is a little dense for a two-parameter tool — the 'Returns compact JSON' sentence is somewhat expansive — but each block carries actionable 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?

Covers selection criteria, prerequisite measurement step, batching, auth restriction, return shape and follow-up verification, which is everything an agent needs to call this correctly in the absence of an output schema. No significant gap remains.

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 description coverage is 50% (only diagram_id and the color/label sub-fields carry descriptions), so the description has to compensate — and it does, supplying the sizing intent (enclose the nodes with ~24px margin), the 12-item batch cap, and how regions relate to node positions. It does not give units or coordinate-system details for x/y/width/height, which is the remaining gap.

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+resource ('add a region', 'draw a labelled translucent area behind existing nodes') and explicitly differentiates from the sibling canvas_group_nodes by naming the exact behavioural difference (grouping moves nodes into a zone; regions do not). An agent can route between the two without opening either schema.

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?

Gives explicit when-to-use triggers (reading aid, overlapping areas, node in two ideas at once), states why the alternative cannot serve those cases, and adds prerequisites ('call canvas_measure_canvas first', ~24px margin) plus a batching rule and a next step. Nothing is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources