Skip to main content
Glama

读取区域内容

read_range

Read a worksheet's content as a 2D array. Use an optional range (e.g., A1:D20) to load only part of large sheets; empty cells become null and dates become ISO strings.

Instructions

读取一张工作表的内容,返回二维数组。不传 range 则读整张表;表很大时建议先传 range 读一部分(如前 50 行)了解结构。空单元格为 null,日期为 ISO 字符串。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeNo矩形区域,如 `A1:D20`
filePathYesExcel 文件的绝对路径,例如 `C:\Users\xx\报表.xlsx` 或 `/Users/xx/报表.xlsx`。支持 .xlsx / .xls / .csv
sheetNameNo
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses key behaviors well: empty cells return null, dates are ISO strings, return type is 2D array. These are precisely the behavioral quirks (null handling, date formatting) that would trip up an agent. Minor gap: doesn't mention authorization/permissions or what happens with out-of-range requests, but the core runtime behavior is well covered.

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?

Three short sentences, front-loaded with the core purpose, then pragmatic usage advice, then return-format notes. Every sentence adds value. Could perhaps trim, but it's tight and well-ordered. No fluff or redundancy.

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 read tool with 3 params and no output schema, the description handles the main edge cases (empty cells, dates, large sheets). The null/ISO-date contract partially substitutes for an output schema. It doesn't explain sheetName default behavior, and performance limits aren't quantified, but for a moderately simple read command the completeness is strong.

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 67% (filePath and range have descriptions; sheetName only has minLength). The description compensates by explaining the range parameter's semantics (optional, whole-sheet when omitted, partial read recommendation) beyond the schema's terse '矩形区域'. The date/null return semantics add meaning to what's expected. Slight gap: sheetName behavior when omitted isn't explained.

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 clearly states '读取一张工作表的内容,返回二维数组' (read worksheet content, return 2D array), with a specific verb+resource. It distinguishes scope clearly (whole sheet vs range) and is conceptually distinct from siblings like write_range or sort_range. The title matches the function precisely.

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?

Description gives explicit guidance: '不传 range 则读整张表;表很大时建议先传 range 读一部分(如前 50 行)了解结构' — tells the agent when to omit range (small sheets) and when to include it (large sheets, read first 50 rows). This is practical, concrete usage direction that directly distinguishes the read operation from write/format/sort siblings.

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