Skip to main content
Glama

read_cells

Read-only

Read Excel worksheet cell data as single values, rectangular ranges, or chunked streams. Choose a mode to also include formulas, metadata, and style information.

Instructions

Read cell data from a worksheet.

Args: mode: One of "single", "range", or "chunked". Determines the behaviour and required parameters. - "single": returns a single cell value. Requires cell_ref. - "range": returns a rectangular range. Requires start_cell and end_cell. - "chunked": returns a chunked reader result for large sheets. Optional: start_row, chunk_size. file_path: Path to the workbook (validated by utils). sheet_name: Worksheet name. cell_ref: Cell reference for single-cell reads (e.g. "A1"). start_cell: Top-left cell for range reads. end_cell: Bottom-right cell for range reads. include_formula: If True, include formula text when available. include_metadata: If True, include additional metadata (styles, comment presence, etc.). show_formula: For range reads, include formulas instead of values when True. show_style: For range reads, include style information when True. output_format: Format for range output; typically "json". max_cells: Maximum cells to return for range reads (to avoid huge payloads). start_row: For chunked reads, starting row index (0-based). chunk_size: Number of rows per chunk for chunked reads.

Returns: dict or ChunkReadResult: Single value, range payload, or chunked reader object depending on mode.

Raises: ValueError: If required parameters for the chosen mode are missing or mode is unknown.

Notes: - Read-only: this function only reads workbook data and should not mutate files. - Dispatch mapping: "single"→tools.cell_ops.read_cell, "range"→tools.cell_ops.read_range, "chunked"→tools.cell_ops.read_file_chunked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
cell_refNo
end_cellNo
file_pathYes
max_cellsNo
start_rowNo
chunk_sizeNo
sheet_nameYes
show_styleNo
start_cellNo
show_formulaNo
output_formatNojson
include_formulaNo
include_metadataNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond the readOnlyHint annotation, the description explicitly states 'Read-only: this function only reads workbook data and should not mutate files.' It also discloses the return type (dict or ChunkReadResult), error conditions (ValueError for missing/invalid mode), and internal dispatch mapping, which provides substantial behavioral context.

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 longer than average but well-structured with clear sections (Args, Returns, Raises, Notes) and bullet-style formatting. Every sentence adds functional value, and the opening line front-loads the core purpose. The length is proportionate to the tool's 14-parameter complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the parameter count (14), multiple modes, and presence of an output schema, the description fully covers usage, edge cases, and behavior. It includes format options, safety notes, error handling, and return type expectations. No critical contextual gaps are apparent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description carries the full burden of explaining parameters. It does so thoroughly, defining each of the 14 parameters, their purpose, and their mode-specific applicability (e.g., cell_ref for single reads, start_row/chunk_size for chunked reads). This fully compensates for the schema's lack of descriptions.

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 opens with a specific verb and resource: 'Read cell data from a worksheet.' It then clearly enumerates the three modes (single, range, chunked) and their distinct outputs, which distinguishes it from sibling tools like write_cells, clear_range, and get_sheet_summary.

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 detailed mode-based guidance, specifying exactly which parameters are required for each behavior (e.g., 'single' requires cell_ref; 'range' requires start_cell and end_cell). It also advises chunked mode for large sheets. However, it does not explicitly name alternative sibling tools or state when not to use this tool, so it falls short of full alternative comparison.

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/mbeps/excel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server