Skip to main content
Glama

Read Excel Workbook

xl_read
Read-onlyIdempotent

Inspect Excel workbooks read-only before editing: view grids, read cells, query and find data, read tables, and run audits/checks without changing the file, even while it is open in Excel.

Instructions

Read-only: look at a workbook before changing it (grid view, cells, queries, find, tables, audits, checks). Never changes a file, and works while it is open in Excel. To change anything use xl_edit, xl_format, xl_structure, xl_workbook or xl_app. Ops, one per line, as name(required; opt optional): what it does. path, backup and verify_com are not repeated; xl_help shows them:

  • get_workbook_metadata(): Read sheets, true used ranges, names, tables and a hazard summary; the call to orient before editing.

  • get_grid_view(opt location sheet max_rows max_cols values): Show a sheet or range as a compact A1 table with formula and merge markers, plus an anchor token for later edits.

  • read_range(location; opt values sheet): Read a cell or range by location; values='displayed' gives the text Excel shows, 'both' labels each value.

  • get_cells(cells; opt values sheet): Read many individually addressed cells in one call, the scatter complement to the rectangular read_range.

  • query_range(opt location sheet header columns where match order_by aggregate group_by limit offset distinct records values): Filter, sort, page and aggregate a range on the server, so only the rows and columns needed come back.

  • find_cells(query; opt look_in match match_case sheet location limit offset): Find every cell whose value or formula matches (exact, contains or regex), with its address; pages with limit and offset.

  • get_table(name; opt columns values records): Read a table's data by its name (case-insensitive).

  • diagnose_workbook(): Scan for fragile parts (pivots, slicers, shapes, macros, queries) a file save would drop, and recommend the route.

  • validate(opt checks): Run read-only checks (default structure, references, calc_staleness) and return one report.

  • audit_formulas(opt location sheet): Audit formulas in a range, sheet or workbook: external references, volatile functions, missing cached values, errors. More ops follow, in the same format, in the op parameter's description.

Input Schema

NameRequiredDescriptionDefault
opYesThe operation to run: an op listed in this tool's description, or one of these, in the same format: - audit_styles(opt top): Count the workbook's cell formats against Excel's 64,000 limit and rate the bloat risk (ok, elevated or critical). - get_pivot(opt sheet): Describe existing pivot tables (source, fields, last refresh); creating or refreshing one is xl_app com_manage_pivot. - get_connections(): List data connections and Power Query presence; connection strings can hold credentials, so treat them as sensitive. - get_external_links(): List links to other workbooks with their cached values, which are copies of other files' data, so treat them as sensitive. - inspect_vba(): Report whether the workbook carries VBA, with module names and sizes; this server never writes or runs macros. - get_workflows(opt task): Recommended tool sequences for common multi-step spreadsheet tasks, each step naming the tool and op to call and the rationale. - get_server_info(opt include_licensee): Report version, edition, license status, tool and op counts, launch-settings narrowing and platform; needs no workbook. - com_status(): Report whether Excel is available to this server and what its hidden Excel is doing; never starts Excel.
argsNoThe op's arguments as an object. Include path (the workbook file) unless the op's line names other paths or the op reads no workbook; unknown keys are refused. xl_help lists every argument.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds context they cannot carry: it works while the file is open in Excel, get_connections and get_external_links return credential-bearing or copied data and should be treated as sensitive, inspect_vba never writes or runs macros, com_status never starts Excel, and get_server_info needs no workbook. These are real operational constraints an agent cannot infer from structured fields.

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 read-only guarantee and the sibling routing before any op detail, and the fixed "name(required; opt optional): what it does" format makes the long list scannable. It is dense and lengthy, but nearly every line carries distinct selection or argument information, so little is wasted.

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?

This is an 18-op multiplexer with a nested args bag and no output schema, so the description must carry the full burden. All 18 ops are accounted for (10 inline, the remaining 8 in the op parameter description) with what each returns, its key arguments, and cross-tool escape hatches (e.g. pivot creation goes to xl_app com_manage_pivot).

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

Parameters4/5

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

Schema coverage is 100% and the op enum is already documented in the schema, so the baseline is 3. The description goes further by listing each op's named arguments with short semantics (values='displayed' vs 'both', limit/offset paging, case-insensitive table name, header/where/group_by for query_range) and by explaining that path/backup/verify_com apply broadly and xl_help holds the rest.

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?

Opens with a specific verb+resource+scope ("Read-only: look at a workbook") and enumerates the concrete surface it covers (grid view, cells, queries, find, tables, audits, checks). It then names the exact siblings that do the opposite (xl_edit, xl_format, xl_structure, xl_workbook, xl_app), so an agent can place it among the family without opening any 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?

Explicit when ("look at a workbook before changing it") and when-not ("To change anything use xl_edit, xl_format..."), plus per-op routing such as get_workbook_metadata being "the call to orient before editing" and get_cells being "the scatter complement to the rectangular read_range". Alternatives and selection conditions are stated, not implied.

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