Skip to main content
Glama

Duplicate shapes

duplicate_elements

Copies BPMN shapes with names, types, docs, colors, connections, and contained elements, placing copies below or at an offset and returning new IDs by original ID.

Instructions

Copies shapes, with their names, types, documentation, colors and the connections between them, like copy and paste in the editor. All the shapes must have the same parent (the same pool, or the process). The copy is placed below the originals, or shifted by dx and dy. Copying a pool or an expanded subprocess copies what it contains. Connections to shapes that are not copied are left out: draw them with connect_shapes. Returns the new id of each copied element, by original id.

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": {
      "ids": "<ids>"
    },
    "name": "duplicate_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
dxNoHorizontal shift of the copy in pixels. Default: 0
dyNoVertical shift of the copy in pixels. Default: the height of the copied group plus 60
idsYesIds of the shapes to copy, as returned by get_shapes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.6

TDQS

A4.7/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description adds real behavioral detail on top: what content is duplicated, where the copy lands, that cross-boundary connections are dropped, and that the return value maps original ids to new ids. Since no output schema exists, stating the return format is genuinely valuable. It stops short of noting that repeated calls create additional copies or anything about undo, which is why it is not 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 the core action, then constraints, then placement, then the degradation rule with its alternative, then the return value. Five short sentences, none of which restate the name or waste words.

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?

For a three-parameter mutation tool with no output schema, this covers action, constraints, side effects on connections, placement defaults, and the return shape. Nothing an agent needs in order to call it correctly appears to be missing.

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 the baseline is 3, but the description adds meaning the schema does not: the same-parent constraint on the ids array and the fact that dx/dy are alternatives to the default below-original placement rather than required inputs. That is a substantive constraint that would otherwise be invisible.

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 (copies) and resource (shapes) plus exactly what is carried over: names, types, documentation, colors, connections. The 'like copy and paste in the editor' analogy and the explicit contrast with add_shapes/connect_shapes make it distinguishable from siblings without opening a 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 preconditions ('All the shapes must have the same parent'), placement defaults, the pool/subprocess expansion case, and a named alternative for the case it does not handle ('Connections to shapes that are not copied are left out: draw them with connect_shapes'). When-to-use and when-not-to-use are both covered.

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