Skip to main content
Glama

往电子表格写值 / 追加行

feishu_sheet_write
Destructive

Write a 2D array of values into a Feishu spreadsheet range, either overwriting existing cells or appending rows after the last data row, for bulk data entry and updates.

Instructions

把二维数组写进表格。range 写 "Sheet1!A1:B2"(带表名)或只写 "A1:B2"(默认第一个工作表)。mode=overwrite 覆盖区间内原有的值;mode=append 接在已有数据末尾往下追加(不覆盖)。values 是行 × 列:[[1,"甲"],[2,"乙"]] 表示两行两列。空字符串写空格,null 会留空。只写值,改不了样式、合并单元格、公式(写进去的字符串会被当文本)。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "spreadsheet_token": "<spreadsheet_token>",
      "range": "<range>",
      "values": "<values>"
    },
    "name": "feishu_sheet_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNooverwrite 覆盖(默认),append 追加到已有数据末尾。
rangeYesA1 区间,如 "Sheet1!A1:B2" 或 "A1:B2"。
valuesYes二维数组:外层是行,内层是列。
spreadsheet_tokenYes电子表格 token。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already flag destructive=true and readOnly=false; the description adds real value beyond that by scoping the destruction (only values in the given range), and by disclosing what the write cannot do: styles, merged cells, and formulas are untouched, and written strings become plain text. It leaves out permission/token requirements and any error behavior, keeping it below a 5.

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?

Front-loaded with the action, then range format, then mode semantics, then value edge cases — a sensible priority order. The final sentence is dense and clause-heavy but every clause carries distinct information, so there is little dead weight.

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 four-parameter destructive write tool with no output schema, the description covers format, mode consequences, and value edge cases well. The one gap is that it says nothing about what the call returns (e.g., updated range or row counts), which would help an agent chain subsequent reads.

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 still adds meaning the schema does not carry, notably that an A1 range without a sheet name defaults to the first worksheet, and the distinction between empty string (writes a space) and null (leaves blank). The row × column example for values reinforces the nested array shape.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: "把二维数组写进表格" plus the title names both write and append semantics. It is immediately distinguishable from read-oriented siblings like feishu_sheet_read, but it never names or contrasts any sibling tool explicitly.

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 resolves the main usage decision an agent faces here — overwrite vs append — by spelling out the consequence of each ("覆盖区间内原有的值" vs "接在已有数据末尾往下追加(不覆盖)"). It gives no guidance on when to use this tool versus feishu_bitable_add or feishu_doc_append, so context is clear but exclusions are absent.

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