Skip to main content
Glama

写入区域数据

write_range

Write a 2D array of values into an Excel sheet starting from a specified cell. Pass null to clear cells; the target sheet must already exist.

Instructions

从 startCell 开始写入一个二维数组(先行后列)。一个格子就传 [[值]];一大片就传多行多列。值为 null 会清空对应单元格。字符串不会被套公式——要写公式请用 set_formula。目标工作表必须已存在(没有就先用 add_sheet)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesYes二维数组,每个内层数组是一行。`null` 表示清空该单元格
filePathYesExcel 文件的绝对路径,例如 `C:\Users\xx\报表.xlsx` 或 `/Users/xx/报表.xlsx`。支持 .xlsx / .xls / .csv
sheetNameYes
startCellYes单元格地址,如 `B5`
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses key behaviors: null values clear cells (not just write null), strings are not auto-interpreted as formulas, and there's a dependency on sheet existence. It doesn't describe return value or whether writes are committed/appended, but given no output schema and no annotation, the disclosed behavioral traits are substantial and helpful.

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 compact (4 sentences) and front-loaded with the core write operation, then adds the single/multi-cell nuance, null semantics, formula caveat, and sheet prerequisite in efficient order. Every sentence earns its place with no fluff or repetition.

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?

The tool is moderately complex (2D array input, multiple formats via filePath, a sheet-dependency). The description addresses the key complexity: how to shape values, null handling, formula distinction, and sheet existence prerequisite. It doesn't cover format-specific behaviors (e.g., .csv quirks) or return values, but with 14 sibling tools and no output schema, it covers the essential decision points an agent needs.

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 75% (values, filePath, startCell have descriptions; sheetName lacks one). The description adds meaning beyond the schema: it explains row-major ordering, the [[value]]/multi-row/col shapes for values, and clarifies the null semantics and formula behavior. The mostly-undocumented sheetName param dependency (must exist) is partially addressed. This adds genuine value over the schema.

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 (write) + resource (a 2D array starting from startCell, row-major order). It clearly distinguishes from siblings: explicitly contrasts with set_formula ('字符串不会被套公式——要写公式请用 set_formula') and mentions empty-cell handling via null. This differentiates it well from read_range and set_formula.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance: single cell pass [[value]], a region pass multi-row/col, null clears cells, formulas require set_formula instead, and the target sheet must already exist (use add_sheet otherwise). These are concrete usage instructions that an agent can act on, including a named alternative tool (set_formula, add_sheet).

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