Skip to main content
Glama
marekrost

mcp-server-spreadsheet

copy_workbook

Copy spreadsheet files to new locations while preserving all data. Specify source and destination paths to create duplicate workbooks.

Instructions

Copy an existing spreadsheet file to a new location.

Performs a full file copy preserving all data. The destination must not already exist. Returns the absolute path of the new file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesPath to the existing spreadsheet file to copy
destinationYesPath for the new copy. Must not already exist.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The copy_workbook tool handler executes a file copy using shutil.copy2, validates that the source exists and the destination does not, and returns the absolute path of the new file.
    def copy_workbook(
        source: Annotated[str, Field(description="Path to the existing spreadsheet file to copy")],
        destination: Annotated[str, Field(description="Path for the new copy. Must not already exist.")],
    ) -> str:
        """Copy an existing spreadsheet file to a new location.
    
        Performs a full file copy preserving all data. The destination must
        not already exist. Returns the absolute path of the new file.
        """
        src = Path(source)
        if not src.exists():
            raise ValueError(f"Source not found: {source}")
        dst = Path(destination)
        if dst.exists():
            raise ValueError(f"Destination already exists: {destination}")
        shutil.copy2(src, dst)
        return str(dst.resolve())
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it performs a 'full file copy preserving all data' (indicating completeness and non-destructive behavior), specifies a constraint ('destination must not already exist'), and states the return value ('Returns the absolute path of the new file'). This covers essential operational details, though it lacks information on permissions, rate limits, or error handling.

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?

The description is front-loaded with the core purpose in the first sentence, followed by two concise sentences that add critical behavioral details and output information. Every sentence earns its place with no wasted words, making it highly efficient and easy to parse.

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?

Given the tool's moderate complexity (copy operation with two parameters), 100% schema coverage, and the presence of an output schema (implied by 'Has output schema: true'), the description is complete enough. It covers the action, constraints, and return value, providing sufficient context for an agent to use the tool correctly without needing to explain parameters or output details that are already documented elsewhere.

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?

The input schema has 100% description coverage, providing clear documentation for both parameters (source and destination). The description adds minimal value beyond the schema by reiterating that the destination 'must not already exist,' which is already stated in the schema. This meets the baseline score of 3, as the schema does the heavy lifting.

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 clearly states the specific action ('Copy an existing spreadsheet file') and resource ('spreadsheet file'), distinguishing it from siblings like copy_range or copy_sheet which operate on parts of spreadsheets rather than entire files. It precisely communicates the tool's function without ambiguity.

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 provides clear context for usage by specifying 'The destination must not already exist,' which helps avoid errors. However, it does not explicitly mention when to use this tool versus alternatives like create_workbook_file for new files or copy_range for partial copies, leaving some guidance implicit rather than explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marekrost/mcp-server-spreadsheet'

If you have feedback or need assistance with the MCP directory API, please join our Discord server