Skip to main content
Glama
marekrost

mcp-server-spreadsheet

create_workbook_file

Create new spreadsheet files in XLSX, CSV, or ODS format at specified paths for organizing data with customizable sheet names.

Instructions

Create a new empty spreadsheet file at the given path.

The file format is determined by the extension (.xlsx, .csv, or .ods). The file must not already exist. Returns the absolute path of the created file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath where the new file will be created (.csv, .ods, .xlsx). Must not already exist.
sheet_nameNoName for the initial sheet. Defaults to 'Sheet' for xlsx/ods, 'default' for csv.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `create_workbook_file` tool creates an empty spreadsheet file at a specified path, supporting .xlsx, .csv, and .ods formats. It validates that the file does not already exist, initializes the workbook, and saves it.
    def create_workbook_file(
        file: Annotated[str, Field(description=f"Path where the new file will be created ({_EXT_LABEL}). Must not already exist.")],
        sheet_name: Annotated[str | None, Field(description="Name for the initial sheet. Defaults to 'Sheet' for xlsx/ods, 'default' for csv.")] = None,
    ) -> str:
        """Create a new empty spreadsheet file at the given path.
    
        The file format is determined by the extension (.xlsx, .csv, or .ods).
        The file must not already exist. Returns the absolute path of the
        created file.
        """
        p = Path(file)
        if p.exists():
            raise ValueError(f"File already exists: {file}")
        wb = create_workbook(file, sheet_name)
        wb.save(file)
        return str(p.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 behaviors: the tool creates a file (implying mutation), specifies format determination by extension, enforces that the file must not exist (preventing overwrites), and states the return value. It lacks details on permissions, error handling, or rate limits, but covers essential operational traits.

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 essential details in compact sentences. Every sentence adds value: file format, existence check, and return value, with zero waste or redundancy.

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, 100% schema coverage, and presence of an output schema (implied by 'Returns the absolute path'), the description is complete enough. It covers purpose, usage constraints, and key behaviors without needing to explain return values or parameters in depth, making it adequate for an AI agent.

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 description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds minimal value beyond the schema, mentioning file format determination and non-existence requirement, which are partially covered in the schema. Baseline 3 is appropriate 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 ('Create a new empty spreadsheet file') and resource ('at the given path'), distinguishing it from siblings like copy_workbook or list_workbooks by focusing on creation from scratch. It specifies the file formats supported and the requirement that the file must not already exist.

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: creating a new empty spreadsheet file with specific extensions, and it implicitly distinguishes from alternatives by not overlapping with copy_workbook or other modification tools. However, it does not explicitly state when not to use this tool or name specific alternatives, such as for modifying existing files.

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