Skip to main content
Glama
marekrost

mcp-server-spreadsheet

append_rows

Add new rows to the end of a spreadsheet sheet. Use this tool to efficiently append data like [['Alice', 30], ['Bob', 25]] after the last used row.

Instructions

Append one or more rows after the last used row in the sheet.

Values are type-coerced (numeric strings to numbers). This is the most efficient way to add data to the end of a sheet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the spreadsheet file
dataYesList of rows to append, e.g. [['Alice', 30], ['Bob', 25]]. Each inner list is one row.
sheetNoSheet name. Defaults to the first sheet if omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the `append_rows` tool, which uses `@mcp.tool()` to register it and handles appending rows to a spreadsheet.
    @mcp.tool()
    def append_rows(
        file: Annotated[str, Field(description="Path to the spreadsheet file")],
        data: Annotated[list[list], Field(description="List of rows to append, e.g. [['Alice', 30], ['Bob', 25]]. Each inner list is one row.")],
        sheet: Annotated[str | None, Field(description="Sheet name. Defaults to the first sheet if omitted.")] = None,
    ) -> str:
        """Append one or more rows after the last used row in the sheet.
    
        Values are type-coerced (numeric strings to numbers).
        This is the most efficient way to add data to the end of a sheet.
        """
        wb = load_workbook(file)
        ws = _resolve_sheet(wb, sheet)
        for row in data:
            ws.append([coerce_value(v) for v in row])
        wb.save(file)
        return f"Appended {len(data)} 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 usefully adds context about type coercion ('Values are type-coerced') and efficiency ('most efficient way'), which are not in the schema. However, it lacks details on permissions, error conditions, or what happens if the sheet is empty, leaving gaps for a mutation tool.

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 front-loaded with the core purpose in the first sentence, followed by two concise, value-adding sentences about type coercion and efficiency. Every sentence earns its place with no wasted words, making it highly efficient.

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 (a mutation operation with 3 parameters), no annotations, but a rich input schema (100% coverage) and an output schema (implied by 'Has output schema: true'), the description is mostly complete. It covers purpose, usage context, and behavioral traits like type coercion, though it could benefit from more transparency on mutation risks or output details.

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 documents all parameters thoroughly. The description does not add any parameter-specific semantics beyond what the schema provides (e.g., it doesn't explain 'data' format further). Baseline 3 is appropriate when the schema does the heavy lifting.

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 specific action ('Append one or more rows after the last used row in the sheet'), identifies the resource ('sheet'), and distinguishes it from siblings like 'insert_rows' (which inserts at specific positions) or 'write_range' (which writes to arbitrary locations). The phrase 'most efficient way to add data to the end of a sheet' further differentiates its purpose.

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 ('most efficient way to add data to the end of a sheet'), implying it should be preferred over alternatives like 'write_range' or 'insert_rows' for appending. However, it does not explicitly state when NOT to use it or name specific alternative tools, which prevents 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