Skip to main content
Glama

Add page

add_page

Append a new page (tab) to the current draw.io diagram without altering existing pages or unsaved edits. Use it to add another diagram alongside, not replace everything.

Instructions

Append a new page (tab) to the current diagram WITHOUT touching existing pages or unsaved user changes. Use this when the user wants "another diagram alongside" — e.g. "add a CNN page" — instead of create_new_diagram which wipes everything.

Inputs:

  • name: optional display name for the tab (defaults to Page-N where N = existing-page-count + 1)

  • id: optional explicit page id; if omitted the server generates a short alphanumeric id

  • xml: optional starting content: the mxCell elements of the page (root cells "0" and "1" are added), or a bare . If omitted, the page starts blank.

Returns the new page's id, name, and index so the caller can immediately target it with edit_diagram.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoOptional explicit page id. If omitted the server generates one. Must be unique across pages.
xmlNoOptional starting content: the mxCell elements of the page, or a bare <mxGraphModel>. If omitted the page starts blank.
nameNoOptional display name for the new tab (e.g. "CNN"). Defaults to "Page-N".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations declare destructiveHint=false and openWorldHint=false, so safety is partly covered. The description adds real behavioral context beyond that: it preserves existing pages and unsaved changes, auto-adds root cells '0' and '1', and returns id/name/index. It does not discuss error cases (e.g. duplicate id), so it stops short of a 5.

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?

Front-loaded with purpose and sibling differentiation, then cleanly organized into Inputs and Returns sections. Every sentence carries information (defaults, id generation, root-cell behavior, return payload) with no filler.

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?

There is no output schema, and the description compensates by stating the return payload ('the new page's id, name, and index') and the follow-up workflow ('so the caller can immediately target it with edit_diagram'). For a 3-param, zero-required mutation tool, an agent has everything needed to invoke it correctly.

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 100%, so the baseline is 3, but the description adds meaning beyond the schema: the default naming formula ('Page-N where N = existing-page-count + 1') and the fact that root cells '0' and '1' are injected when xml is supplied. That extra semantic detail raises it above baseline.

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 ('Append a new page (tab) to the current diagram') with a precise non-destructive scope ('WITHOUT touching existing pages or unsaved user changes'). It explicitly distinguishes itself from the sibling create_new_diagram, so an agent can choose between them 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 an explicit when-to-use trigger ('when the user wants "another diagram alongside" — e.g. "add a CNN page"') and names the alternative (create_new_diagram) along with the condition that selects it ('which wipes everything'). 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.