Skip to main content
Glama
Matthew3957

ai-toolkit

by Matthew3957

read_sheet_range

Read cell values from a Google Sheet to reveal the header row and data boundaries before writing, so values can be placed in the correct columns and next free row.

Instructions

Read cell values from a Google Sheet.

Read this before writing: it shows the header row and where the data ends so a write can be column-mapped and placed without guessing.

sheet_id is the spreadsheet's ID (the long token in its URL, .../spreadsheets/d/<sheet_id>/edit); it is required, so confirm which sheet to read per call. range is an A1 notation range — a bare tab name like Sheet1 reads the whole used area, or pass something like Sheet1!A1:E1 for just the header row. value_render_option FORMATTED_VALUE returns values as displayed; UNFORMATTED_VALUE returns raw numbers/dates; FORMULA returns the underlying formulas.

Returns {"range": <resolved A1 range>, "values": <rows>} where values is a list of rows, each a list of cell strings. Trailing empty rows and cells are omitted by the API, so len(values) is the number of populated rows from the top of range — the next free row when range starts at row 1 is len(values) + 1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeNoSheet1
sheet_idYes
value_render_optionNoFORMATTED_VALUE

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it does so thoroughly. It discloses that trailing empty rows/cells are omitted by the API, explains how to interpret len(values) to find the next free row, and details the three value_render_option behaviors. It also specifies the return object shape, covering the key behavioral aspects an agent needs.

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 appropriately sized for the complexity, front-loading the core purpose and then systematically explaining each parameter and the return semantics. Every sentence adds value; no redundancy or filler. It uses clear examples and structured explanations without being bloated.

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?

For a read tool with a documented output format, the description is complete. It covers the return object with fields 'range' and 'values', explains the row/col structure, and addresses API quirks like omitted empty rows. It even provides a formula for the next free row, which is critical for the intended pre-write use case. No necessary information is missing.

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?

Schema description coverage is 0%, so the description must fully compensate, and it does. It explains sheet_id as the long token from the URL, range as A1 notation with examples (Sheet1 vs Sheet1!A1:E1), and value_render_option with the three enum-like values (FORMATTED_VALUE, UNFORMATTED_VALUE, FORMULA) and their meanings. This adds substantial meaning beyond the bare schema.

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 states a specific verb and resource ('Read cell values from a Google Sheet') and explicitly frames it as a pre-write step, distinguishing it from sibling write tools like append_sheet_row and update_sheet_range. It also clarifies the purpose of reading the header and data extent, making its role unambiguous.

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?

It explicitly instructs to read before writing and explains why, giving a clear when-to-use. It also details how to use range to read the whole used area or a specific subrange, and notes that sheet_id is required and should be confirmed per call. This effectively routes the agent to the correct usage.

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