Skip to main content
Glama

read_range

Retrieve Excel sheet data with pagination, format markers, and hidden content handling. Get values, formulas, and cell coordinates in batches to avoid large reads.

Instructions

读取工作表数据,支持分页、截断、格式语义与隐藏内容处理。

重要:不要试图一次读完大表。默认 limit=200 行, 超出的部分通过增大 offset 分批获取(truncated 会告诉你是否还有剩余)。

参数:

  • sheet:工作表名,省略则用活动表

  • cell_range:Excel 区域,如 "A1:D50";省略则读整表(仍受 limit 约束)

  • offset / limit:分页,从第 offset 行开始取 limit 行

  • include_format:是否附加格式语义标记(默认 True)

  • include_hidden:是否读取隐藏行列(默认 False)

格式语义标记(汲取自 excel-vision-mcp —— 作者留下的格式是有含义的):

  • [B] 粗体 / [I] 斜体 / [S] 删除线(常表示"已取消/作废")

  • [HL:色] 底色高亮(常表示"待审阅/重点") / [C:色] 字体色

  • [M] 合并单元格 / [HIDDEN-REF] 已隐藏但因被公式引用而保留 注意:只在单元格真的用了格式时才附加,朴素表格不产生任何额外 token。

隐藏内容:默认跳过(作者隐藏通常表示不属于审阅内容), 但被可见公式引用的隐藏单元格仍保留并标记 [HIDDEN-REF], 且始终报告跳过了多少,绝不静默丢弃。

返回:grid(二维值)、cells(坐标→值)、formulas、format_markers。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
sheetNo
offsetNo
file_pathYes
cell_rangeNo
include_formatNo
include_hiddenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses hidden-row handling, format-marker semantics, defaults, and the fact that hidden cells referenced by formulas are retained and marked. Minor gap: it promises a truncated indicator and skipped-count reporting, but the listed return fields do not include those values.

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 well organized with a front-loaded warning, a parameter list, format-marker explanations, and a return summary. Despite its length, every section adds necessary behavioral or semantic value, and the structure makes it easy for an agent to scan.

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 7-parameter tool with no output schema, the description is unusually complete: it explains pagination, defaults, hidden-content behavior, format markers, and return fields. It is incomplete only in not listing truncated and skipped-count in the return summary and not documenting the required file_path parameter.

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 description coverage is 0%, and the description compensates by explaining sheet, cell_range, offset/limit, include_format, and include_hidden, including defaults and examples such as 'A1:D50'. It omits file_path, which is the only required parameter, leaving a small but notable gap.

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?

The description clearly states it reads worksheet data with pagination, format semantics, and hidden-content handling, and the parameter list confirms the exact resource and scope. It is unambiguous from the name and siblings, though it does not explicitly differentiate itself from sibling read-like tools such as sheet_profile or workbook_info.

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?

It gives explicit practical guidance: do not read large tables in one call, use limit/offset, and rely on the truncated indicator to detect remaining rows. It does not explicitly name alternatives or say when to choose another sibling tool, so it stops short of a 5.

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