Skip to main content
Glama

Inspect a sheet

inspect_sheet
Read-onlyIdempotent

Use this when the user asks what sheets or columns a spreadsheet has, how many rows it has, or how many pages it would print before making a PDF. Takes the same file or CSV text, sheet, columns and layout options as sheet_to_pdf and returns the sheets (with hidden ones marked), the header row, row and column counts, empty and widest columns, formula cells without a saved result, a 5-row preview and the page estimate for the chosen layout. Does not make a file and does not change the sheet.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "inspect_sheet"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoThe sheet to print: a CSV, TSV or Excel .xlsx file, e.g. inventory.xlsx or contacts.csv.
paperNoPaper size, e.g. a4. Default letter.
sheetNoFor .xlsx: the sheet name to print, e.g. "Q3 Sales". Default: the first visible sheet.
titleNoOptional title above the table on page 1, up to 120 characters, e.g. "Inventory, November 2026".
columnsNoPrint only these columns, in this order, by header name or column letter, e.g. ["Name", "Email", "Total"]. Default: all columns.
csv_textNoInstead of a file: the table as CSV text with a header row, e.g. "Name,Qty\nApples,3\nPears,5". Use either file or csv_text.
delimiterNoFor CSV text: the separator, e.g. semicolon. Default: detected from the file.
fit_widthNotrue (default): when columns are too wide, the font gets smaller (down to 7 pt) before cells wrap. false: keep font_size and wrap cell text.
font_sizeNoFont size in points from 7 to 12, e.g. 9 (default).
has_headerNotrue (default): the first non-empty row is the header row (one-cell title rows above it are printed as the title). false: columns are named Column A, Column B, ...
header_rowNoThe sheet row (or CSV line) number that holds the header, e.g. 3 when rows 1-2 hold a title. Rows above it are left out. Default: detected.
orientationNoPage orientation, e.g. landscape. auto (default) picks portrait when the columns fit, else landscape.
row_numbersNotrue adds a # column with row numbers 1, 2, 3. Default false.
page_numbersNotrue (default) prints Page 1 of N in each page footer.
include_hiddenNoFor .xlsx: true also prints hidden rows and columns. Default false (as Excel prints).

Output Schema

NameRequiredDescriptionDefault
fileYes
kindYes
notesYes
sheetYes
headerYes
sheetsYes
columnsYes
previewYes
encodingNo
estimateYes
data_rowsYes
delimiterNo
header_noteYes
hidden_rowsYes
header_countNo
empty_columnsYes
preview_countNo
hidden_columnsYes
widest_columnsYes
formula_cells_without_valueYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, yet the description still reinforces the safety profile with 'does not make a file and does not change the sheet'. It goes further by enumerating what is returned (hidden sheets marked, empty and widest columns, unresolved formula cells, 5-row preview, page estimate) — behavior an agent could not infer from the hints alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the trigger condition, then the input contract, then the return contents, then the non-effects. It is a single dense paragraph — the returned-fields enumeration is long but each item is a distinct piece of information an agent would otherwise have to discover by calling the tool.

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 15-parameter tool with a nested file object and an output schema, the description covers trigger, input relationship to the sibling, output contents and side-effect guarantees. Minor gap: it never states that a file or csv_text is effectively required, since the schema marks zero required parameters and the reader must infer the either/or from the parameter descriptions.

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 per-parameter meaning is already fully documented there and the baseline applies. The description adds only a high-level grouping ('file or CSV text, sheet, columns and layout options') plus the useful note that these options mirror sheet_to_pdf; it contributes no syntax or constraint detail beyond the 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?

States a specific verb and resource ('inspect_sheet' → inspect a sheet) and immediately scopes it to concrete questions: which sheets/columns exist, row counts, and printable page counts. It also names the sibling tool sheet_to_pdf and distinguishes itself from it, so an agent can route without opening either schema.

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?

The description opens with an explicit trigger ('Use this when the user asks...') listing three concrete question types, and adds an exclusion ('Does not make a file'). It also tells the agent that the input shape matches sheet_to_pdf, implicitly identifying that sibling as the alternative when a PDF is actually wanted.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources