Skip to main content
Glama
marekrost

mcp-server-spreadsheet

read_sheet

Extract spreadsheet data as structured rows, with optional bounds to limit output for large sheets. Returns cell values with empty cells as null.

Instructions

Read an entire sheet (or a bounded sub-region) as a list of rows.

Each row is a list of cell values. Empty cells appear as null. Use the optional row/column bounds to limit output for large sheets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the spreadsheet file
sheetNoSheet name. Defaults to the first sheet if omitted.
start_rowNoFirst row to include (1-based). Defaults to the first used row.
end_rowNoLast row to include (1-based). Defaults to the last used row.
start_columnNoFirst column to include (1-based, e.g. 1 = A). Defaults to the first used column.
end_columnNoLast column to include (1-based). Defaults to the last used column.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the `read_sheet` MCP tool, which reads an entire sheet or a sub-region into a 2D list.
    def read_sheet(
        file: Annotated[str, Field(description="Path to the spreadsheet file")],
        sheet: Annotated[str | None, Field(description="Sheet name. Defaults to the first sheet if omitted.")] = None,
        start_row: Annotated[int | None, Field(description="First row to include (1-based). Defaults to the first used row.")] = None,
        end_row: Annotated[int | None, Field(description="Last row to include (1-based). Defaults to the last used row.")] = None,
        start_column: Annotated[int | None, Field(description="First column to include (1-based, e.g. 1 = A). Defaults to the first used column.")] = None,
        end_column: Annotated[int | None, Field(description="Last column to include (1-based). Defaults to the last used column.")] = None,
    ) -> list[list]:
        """Read an entire sheet (or a bounded sub-region) as a list of rows.
    
        Each row is a list of cell values. Empty cells appear as null.
        Use the optional row/column bounds to limit output for large sheets.
        """
        wb = load_workbook(file)
        ws = _resolve_sheet(wb, sheet)
        rows = ws.iter_rows(
            min_row=start_row,
            max_row=end_row,
            min_col=start_column,
            max_col=end_column,
        )
        return [list(r) for r in rows]
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the output format ('Each row is a list of cell values. Empty cells appear as null') and performance considerations for large sheets, but doesn't mention permissions, rate limits, or error conditions. It adds useful context but isn't comprehensive.

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 perfectly concise with three sentences that each earn their place: stating the core functionality, describing the output format, and providing usage guidance. It's front-loaded with the main purpose and wastes no words.

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 moderate complexity, 6 parameters with full schema coverage, and the presence of an output schema, the description is reasonably complete. It explains what the tool does, the output format, and when to use bounds. However, without annotations, it could benefit from more behavioral context about limitations or edge cases.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents all 6 parameters. The description adds marginal value by mentioning the optional bounds for limiting output, but doesn't provide additional syntax or format details beyond what the schema provides. This meets the baseline for high schema coverage.

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 tool's purpose with specific verbs ('Read an entire sheet or a bounded sub-region') and resource ('sheet'), and distinguishes it from siblings like read_cell, read_range, and search_sheet by specifying it returns data as a list of rows rather than individual cells or filtered results.

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 clear context for when to use this tool ('Use the optional row/column bounds to limit output for large sheets'), which helps differentiate it from read_cell or read_range. However, it doesn't explicitly state when not to use it or name specific alternatives, preventing a perfect score.

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/marekrost/mcp-server-spreadsheet'

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