Skip to main content
Glama

新建 Excel 文件

create_workbook

Create a new .xlsx, .xls, or .csv file from scratch, optionally specifying initial worksheet names. Fails if the file already exists to prevent accidental overwriting of existing data.

Instructions

从无到有新建一个 .xlsx 文件。可指定初始工作表名列表。文件已存在时会失败(防误覆盖),不会清空已有文件。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sheetsNo
filePathYesExcel 文件的绝对路径,例如 `C:\Users\xx\报表.xlsx` 或 `/Users/xx/报表.xlsx`。支持 .xlsx / .xls / .csv
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses the critical safety behavior: failing rather than overwriting an existing file ('文件已存在时会失败(防误覆盖),不会清空已有文件'). It confirms write intent through '新建'. Covers key behavioral traits for a file-creation tool.

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 concise sentences with zero waste. Every sentence earns its place: first states the core action and sheet-name flexibility; second discloses the anti-overwrite safety behavior. Front-loaded with the primary purpose.

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 2-param creation tool with no output schema, the description covers purpose, the one optional param (sheets), and the destructive-safety behavior. Minor omission: doesn't specify return value, but for a creation tool this is low-stakes given no output schema and the tool's simplicity.

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 50% (filePath is documented in schema; sheets is documented but the description adds the ability to specify initial sheet names via '可指定初始工作表名列表'). The description adds minimal meaning beyond schema, matching the baseline-3 score for moderate coverage.

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?

Description states a specific verb+resource ('从无到有新建一个 .xlsx 文件') and clearly distinguishes the create/initialize behavior from siblings like add_sheet and rename_sheet. It explicitly scopes creation to 'from scratch' and notes the file-creation semantics.

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 implies when to use (when you need to create a new workbook) and distinguishes from file-modification siblings. It mentions the failure behavior when a file already exists, which guides usage, though it does not explicitly name alternative tools for existing-file scenarios.

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/mutoukenji/mcp-excel'

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