Skip to main content
Glama
basis1: Excel engine for AI agents (formulas, recalculation, audit)

basis1: Excel engine for AI agents (formulas, recalculation, audit)

Official

Recalculate workbook

recalc_workbook
DestructiveIdempotent

Recalculates .xlsx formulas and saves computed values into every formula cell so readers see results instead of empty cells; returns formula-error and uncomputed-formula summaries.

Instructions

Recalculate an .xlsx file and return it with the computed values saved in every formula cell. Use this after you create or edit a workbook with openpyxl or any other library that writes formulas without results: those files have no cached values, so pandas, openpyxl (data_only=True) and other readers see empty cells until the file is recalculated. Replaces running LibreOffice recalc.py. Returns the file plus a summary of formula errors (#REF!, #DIV/0!, #NAME?, #VALUE!... with sheet and cell) and of formulas Basis could not compute: fix those and call again. Styles, charts, images, data validation, defined names, comments and VBA are carried over unchanged. Pass exactly one of path, url or base64. The workbook is uploaded to the Basis API for the recalculation and not kept. Pass output_path to save the result on this machine (the same path as the input, with overwrite: true, recalculates a file in place).

Input Schema

NameRequiredDescriptionDefault
urlNoPublic https URL to fetch the .xlsx file from (private and local addresses are refused)
pathNoLocal filesystem path to an .xlsx file
base64NoBase64-encoded .xlsx file bytes
filenameNoName for the returned file (defaults to workbook.xlsx)
overwriteNoAllow output_path to replace an existing file (default false: an existing file is an error)
output_pathNoWrite the .xlsx to this local path instead of returning it as base64 (recommended: a workbook as base64 is very large). The result then carries saved_to rather than file_base64.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • changedInput schema / properties / url / description
      Previous value: -"URL to fetch the .xlsx file from"New value: +"Public https URL to fetch the .xlsx file from (private and local addresses are refused)"
  2. First observedv0.3.1

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: the workbook is uploaded to the Basis API and not retained (explaining openWorldHint), styles/charts/images/validation/defined names/comments/VBA survive unchanged (a real data-fidelity concern for a destructiveHint=true tool), and the in-place overwrite path is described. It also discloses the return payload, including error summaries with sheet and cell, and the formulas Basis could not compute.

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 action and result, then rationale, then constraints. The dense run-on at the end (output_path/overwrite sentence) is slightly awkward, but every sentence carries operative information and nothing is padding.

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?

There is no output schema, and the description fully compensates by describing the returned file, the error summary shape, the uncomputed-formula report, and the saved_to vs file_base64 distinction. For a 6-parameter mutation tool with external upload, an agent has everything needed to call it correctly and interpret the response.

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 baseline is 3, but the description adds a constraint the schema cannot express: 'Pass exactly one of path, url or base64' — critical since required parameters is zero. It also explains the overwrite/output_path interaction for in-place recalculation, which adds meaning beyond the individual property descriptions.

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 ('Recalculate an .xlsx file') plus the outcome ('return it with the computed values saved in every formula cell'). This clearly separates it from read-only siblings like parse_workbook or inspect_model, which inspect rather than rewrite a file.

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?

Gives an explicit trigger condition: 'Use this after you create or edit a workbook with openpyxl or any other library that writes formulas without results', with the failure mode explained (pandas/openpyxl data_only=True see empty cells). It also names the workflow it replaces (LibreOffice recalc.py) and says to call again after fixing uncached formulas. It does not compare against sibling tools such as parse_workbook or audit_workbook, so the routing is strong but not exhaustive.

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