Skip to main content
Glama

Duplicate section

swebsy_duplicate_section

Duplicate a component with its classes and styles and place the copy immediately after it. Target by id or path; re-read the page before further path-based edits because paths shift.

Instructions

Copy a component (with its classes and styles) and insert the copy right after it. Paths after it shift by one — call read_page before the next path-based edit (ids don't shift).

Input Schema

NameRequiredDescriptionDefault
targetIdNoThe component to copy by its id, as `read_page` shows it after `#` (e.g. "ieyubib", or "call-2-2" in a symbol instance). Stays valid when other components move or are added, unlike a path. Pass this OR the path, not both.
targetPathNoPath (from the most recent `read_page`) of the component to copy.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.13.1
    • addedInput schema / properties / targetId
      Added value: +{
      +  "description": "The component to copy by its id, as `read_page` shows it after `#` (e.g. \"ieyubib\", or \"call-2-2\" in a symbol instance). Stays valid when other components move or are added, unlike a path. Pass this OR the path, not both.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "targetPath"
      -]
  2. Addedv0.10.0

TDQS

A4/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing the copy's scope (classes and styles are carried over) and the non-obvious side effect that paths after the insertion point shift by one. It does not address reversibility, whether the copy is selected afterward, or undo behavior, so it stops short of full behavioral disclosure.

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 sentences with zero filler; the core action comes first and the path-shift warning follows in the same breath as the remedy.

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 two-parameter mutation with no output schema, the description covers what is copied, where it lands, and the indexing consequence for subsequent calls. A note on whether the new component becomes selected or how to obtain its new id would close the remaining gap.

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% and the schema already specifies the id-vs-path tradeoff, the id format, and the mutual exclusivity rule. The description adds nothing about parameter selection, so the baseline 3 applies.

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?

The description names a specific verb sequence and resource: copy a component "with its classes and styles" and insert it "right after it." The placement detail distinguishes it from create-style siblings such as swebsy_add_section, though no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a concrete follow-up rule: call `read_page` before the next path-based edit because paths shift while ids do not. This tells the agent when the tool applies and how to sequence it, but it never states when to prefer duplicates over alternatives such as add_section or duplicate_page.

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