Skip to main content
Glama
xlsx-for-ai

xlsx-for-ai

by senoff

xlsx_eval

Read-onlyIdempotent

Evaluate Excel formulas against a workbook with 350+ functions to return fresh results instead of stale cached values. Handles ad-hoc formulas or specific cell refs.

Instructions

Use this when you need to evaluate Excel formulas against a workbook via a formula engine (over 350 Excel functions, plus the functions only Google Sheets has) — pass ad-hoc formulas or re-evaluate specific cell refs, never trusting a stale cached value. Formulas that name no cell need no file; cell refs need the file. A call takes up to 5,000 cells or formulas when it builds its workbook from a spec, and up to 100 when it carries a file; over the cap it answers 400 too_many_cells. Date text is read under a fixed en-US convention: numeric dates are M/D/Y, ISO-8601 (YYYY-MM-DD) and month names are accepted, and a trailing time part is ignored. Exception: external-data/AI functions (IMPORTRANGE, IMPORTXML, IMPORTHTML, IMPORTDATA, IMPORTFEED, GOOGLEFINANCE, GOOGLETRANSLATE, STOCKHISTORY, AI, COPILOT, PY) are never fetched/run — the cell shows either the value Excel/Sheets saved in the file or the platform's documented error (#N/A / #CONNECT! / #BUSY!), never a freshly fetched result. Each cell or formula the engine did not recalculate (it calls one of these functions, or depends on a cell that does) is listed in the reply's _meta.not_recalculated with a reason that says why, and none of them is a recalculated value: a cell that calls one shows that saved value or documented error, and a cell that depends on one is computed from the value shown for the cell it depends on, not shown with its own saved value; its _meta.cell_values entry carries the same reason as not_recalculated.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_path": "<file_path>"
    },
    "name": "xlsx_eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
cellsNoCell refs to fresh-evaluate, e.g. ["Sheet1!A1", "Calc!B5"].
sheetNoDefault sheet for unqualified cell refs.
formulasNoFreeform formula expressions to evaluate against the workbook. Each ~"=A1+B1" or "=SUM(Sheet1!A:A)".
file_pathYesAbsolute path to the .xlsx file. Pass the path string AS-IS — do NOT read, open, or base64-encode the file; the client handles all file I/O. The base64 surface in this connector is OUTPUT-only (_meta.file_b64).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv4.3.1
    • addedInput schema / properties / cells / description
      Added value: +"Cell refs to fresh-evaluate, e.g. [\"Sheet1!A1\", \"Calc!B5\"]."
    • removedInput schema / properties / cells / items / maxLength
      Removed value: -64
    • removedInput schema / properties / cells / items / minLength
      Removed value: -1
    • removedInput schema / properties / cells / maxItems
      Removed value: -100
    • removedInput schema / properties / file_b64
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / file_path
      Added value: +{
      +  "description": "Absolute path to the .xlsx file. Pass the path string AS-IS — do NOT read, open, or base64-encode the file; the client handles all file I/O. The base64 surface in this connector is OUTPUT-only (_meta.file_b64).",
      +  "type": "string"
      +}
    • addedInput schema / properties / formulas / description
      Added value: +"Freeform formula expressions to evaluate against the workbook. Each ~\"=A1+B1\" or \"=SUM(Sheet1!A:A)\"."
    • removedInput schema / properties / formulas / items / maxLength
      Removed value: -4096
    • removedInput schema / properties / formulas / items / minLength
      Removed value: -1
    • removedInput schema / properties / formulas / maxItems
      Removed value: -100
    • removedInput schema / properties / options
      Removed value: -{
      -  "properties": {
      -    "sheet": {
      -      "type": "string"
      -    }
      -  },
      -  "type": "object"
      -}
    • addedInput schema / properties / sheet
      Added value: +{
      +  "description": "Default sheet for unqualified cell refs.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "file_b64"
      -]New value: +[
      +  "file_path"
      +]
  2. First observedv3.2.1

TDQS

A4/5.0
Behavior5/5

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

Far exceeds the annotations: it discloses the cell/formula caps (5,000 from a spec vs. 100 with a file), the resulting 400 too_many_cells error, the en-US date-text convention with accepted formats, and the fact that external/AI functions are never fetched and instead surface the saved value or a documented error. The _meta.not_recalculated and _meta.cell_values reason semantics are behavior an agent could not learn from readOnlyHint/idempotentHint alone.

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

Conciseness3/5

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

Purpose and caps are front-loaded, but the single block runs long and the closing passage on not_recalculated repeats itself ('listed ... with a reason that says why' and then 'its _meta.cell_values entry carries the same reason'), making the most nuanced rule the hardest to parse. Several clauses earn their place; that final sentence does not in its current form.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and a fairly complex tool, the description covers the failure paths and _meta diagnostics but never states what a normal successful reply contains — where recalculated values land and how they map to the requested cells/formulas. The required-versus-optional status of file_path also remains ambiguous, which matters given one required parameter and a claim that a file is sometimes unnecessary.

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%, so the schema already defines cells, sheet, formulas, and file_path; the description still adds real meaning by tying the numeric cap to whether the workbook is built from a spec or carried as a file, which is not in the schema. It is undercut by saying 'Formulas that name no cell need no file' while the schema marks file_path as required, leaving the agent unsure how to call it for a file-free evaluation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('evaluate Excel formulas against a workbook via a formula engine') and adds qualifying scope: ad-hoc formulas or re-evaluating specific cell refs, explicitly not trusting cached values. It does not name a sibling such as xlsx_formulas to contrast reading formulas vs. computing them, so an agent must infer the split.

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?

'Use this when you need to evaluate Excel formulas ... never trusting a stale cached value' gives a clear triggering condition, and 'Formulas that name no cell need no file; cell refs need the file' states a prerequisite. No explicit when-not-to-use case or named alternative is given, so the routing signal is contextual rather than decisive.

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