Skip to main content
Glama

Duplicate layer

cavalry_duplicate_layer

Duplicate an existing Cavalry layer by its id and return the new layer ids. Optionally copy input connections to preserve wiring.

Instructions

Duplicate a layer. Returns the ids of the newly created layers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerIdYesCavalry layer id, e.g. "basicShape#1". Use cavalry_list_layers to find ids.
withInputConnectionsNoAlso duplicate input connections. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, so the agent knows this is a non-destructive, non-idempotent mutation. The description adds the return value (ids of new layers), which is useful but limited; it doesn't mention side effects, permissions, or state changes beyond the annotations.

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?

Two short sentences with no waste, front-loading the action and the return value immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter mutation tool with no output schema, the description covers the action and return value. However, it omits context on how the duplication behaves (e.g., does it duplicate children? input connections are optional) and lacks usage guidance, leaving gaps for an agent operating in a rich sibling ecosystem.

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 coverage is 100%, so both parameters (layerId, withInputConnections) are fully documented in the schema, including an example and a cross-reference to cavalry_list_layers. The description adds no parameter details beyond the schema baseline.

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?

States a specific verb (duplicate) and resource (layer), and notes it returns ids of new layers. It is distinct from siblings like cavalry_create_layer or cavalry_rename_layer, though it doesn't explicitly name an alternative duplication 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?

No guidance on when to use this tool versus alternatives such as cavalry_create_layer or how it fits in a duplication workflow. The agent must infer context from the name alone.

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