Skip to main content
Glama

写入飞书电子表格

write_feishu_sheet

Write CSV data or formulas to Feishu spreadsheets by overwriting from a cell, appending rows, or setting specific cell values.

Instructions

写入飞书电子表格。模式:overwrite=从锚点单元格(默认 A1)开始粘贴 CSV 文本;append=把 CSV(首行为表头)追加到子表末行;set_cell=向指定区域写值或公式(cells 为二维数组,如 [[{"value":"名称"},{"formula":"=SUM(A1:A2)"}]])。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csvNooverwrite/append 必填:RFC-4180 CSV 文本(append 时首行视为表头)
urlNo电子表格 URL(与 spreadsheet_token 二选一)
modeYes写入模式
cellsNoset_cell 必填:单元格二维数组的 JSON 字符串
rangeNoset_cell 必填:目标区域,如 A1:B2
sheet_idNo子表 ID(与 sheet_name 二选一,必填)
sheet_nameNo子表名称(与 sheet_id 二选一,必填)
start_cellNooverwrite 锚点单元格,默认 A1
allow_overwriteNo是否允许覆盖非空单元格,默认允许
spreadsheet_tokenNo电子表格 token(与 url 二选一)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It explains what each mode does (pastes CSV, appends with header, writes values/formulas) and gives a concrete cells example, which is helpful. However, it omits important side effects such as overwrite behavior (allow_overwrite parameter), what happens to existing data, authentication requirements (check_feishu_auth exists as a sibling), or rate limits. For a write operation, this level of disclosure is insufficient for full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense sentence but packs in all essential mode information without fluff. It is front-loaded with the purpose and then enumerates modes. While a bulleted list might improve readability, the current structure is efficient and every clause earns its place. Slightly verbose but not bloated.

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?

Given the tool's complexity (10 parameters, 3 modes, no output schema, no annotations), the description covers the core usage scenarios well: it explains all three modes, which parameters are required for each, and provides a concrete example. It lacks guidance on parameter conflicts (e.g., both url and spreadsheet_token provided) and the effect of allow_overwrite, but those are covered in schema descriptions. The description is adequate for an agent to invoke the tool correctly in most cases.

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. The description adds significant value by linking parameters to modes: csv for overwrite/append, cells and range for set_cell, start_cell for overwrite, and clarifying that append treats the first row as a header. It also provides a detailed example of the cells format. This goes beyond the schema's individual descriptions and aids correct invocation.

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 verb '写入' (write) and the resource '飞书电子表格' (Feishu spreadsheet), and further breaks down into three distinct modes with concrete behaviors. This distinguishes it from siblings like read_feishu_sheet (read) and write_feishu_doc (doc vs sheet), leaving no ambiguity about what the tool does.

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 explicit mode-specific instructions (overwrite, append, set_cell) that act as usage guidance within the tool, including what each mode expects (CSV, anchor cell, sheet last row, cells array). However, it does not mention when to choose this tool over alternatives like read_feishu_sheet or write_feishu_doc, relying on the name for that distinction. This is a minor gap given the tool's name is self-explanatory.

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