Skip to main content
Glama
orieg

orieg/gws-connector

gws.sheets.duplicate_tab

Duplicate a tab in a Google Spreadsheet to reuse its content, formulas, and formatting for a new tab. Specify source by title or ID and optional position; fails if new title exists.

Instructions

Duplicate an existing tab (sheet) within the same Google Spreadsheet, e.g. copy last month's invoice tab to start this month's. Uses DuplicateSheetRequest, so values, formulas, formatting, merged cells, and column widths are copied. Identify the source with source_tab (exact title) or source_sheet_id (from list_tabs). insert_index is the zero-based position of the new tab (default: last). Returns an error — without changing anything — if a tab named new_title already exists. Returns the new tab's title, sheet_id, and index. This tool modifies the user's document: confirm intent with the user before calling it on documents you did not create in this session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoAccount label or email. Uses default if omitted.
new_titleYesTitle for the new tab; must not already exist
source_tabNoTitle of the tab to copy (either this or source_sheet_id is required)
insert_indexNoZero-based position for the new tab (default: after the last tab)
spreadsheet_idYesThe spreadsheet ID
source_sheet_idNoSheet ID of the tab to copy (either this or source_tab is required)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.3

TDQS

A4.7/5.0
Behavior5/5

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

Even with annotations already declaring readOnlyHint=false and destructiveHint=false, the description adds substantial behavior: the exact DuplicateSheetRequest mechanism, what gets copied (values, formulas, formatting, merged cells, column widths), that an existing new_title fails atomically 'without changing anything,' the return payload (title, sheet_id, index), and a consent requirement for documents not created in-session. This far exceeds what annotations provide.

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?

Roughly 110 words covering purpose, mechanism, copy semantics, source identification, positioning, failure behavior, return values, and consent — every sentence earns its place and none repeat the schema. Information is front-loaded with purpose before mechanics, and the safety warning is placed at the end where it belongs.

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 6-parameter mutating tool with no output schema, the description is complete: it explains how to identify the source, what happens on conflict, what the response will contain, and the safety caveat. Nothing an agent needs to invoke this correctly is 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 meaningful semantics: source_tab must be an 'exact title', source_sheet_id can be obtained 'from list_tabs', insert_index is zero-based with a default, and new_title triggers an atomic error if it already exists. These enrich the parameter meanings beyond the schema's bare definitions.

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?

The description opens with a specific verb+resource pair ('Duplicate an existing tab (sheet) within the same Google Spreadsheet') and immediately distinguishes itself from add_tab by emphasizing it copies an existing tab. The concrete example (copy last month's invoice tab) makes the intent instantly recognizable, and the scope constraint 'within the same Google Spreadsheet' further delimits the operation.

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?

The description gives clear context for when to use the tool: duplicating an existing tab rather than creating a blank one, evidenced by the invoice example. It also references the sibling list_tabs as the way to obtain source_sheet_id, and states the error condition when new_title already exists. It stops short of explicitly naming when NOT to use it (e.g., 'use add_tab for a blank tab'), so it earns a 4 rather than a 5.

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