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

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

Official

Export workbook

export_workbook
DestructiveIdempotent

Save a session's workbook as an .xlsx file with recalculated formula values and a summary of formula errors, so you can hand off or read it outside Excel.

Instructions

Get a session's workbook back as an .xlsx file with every formula's computed value saved in it. Recalculates first. Call this when you need the file itself: to give it to the user, or to read it with pandas, openpyxl (data_only=True) or any tool that is not Excel. Returns the file and a summary of formula errors (#REF!, #DIV/0!, #NAME? with sheet and cell) and of anything that did not survive the save. Everything Basis does not model (styles, charts, images, data validation, defined names, comments, VBA) is carried over from the original file unchanged. Pass output_path to save the file on this machine.

Input Schema

NameRequiredDescriptionDefault
overwriteNoAllow output_path to replace an existing file (default false: an existing file is an error)
session_idYesSession ID returned by create_session (list_sessions shows the open ones)
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 / session_id / description
      Previous value: -"Session ID"New value: +"Session ID returned by create_session (list_sessions shows the open ones)"
  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?

Goes well beyond the annotations: it discloses the side effect ('Recalculates first'), the return payload (file plus a formula-error summary with sheet and cell), the fidelity boundary ('everything Basis does not model ... is carried over unchanged'), and that lossy items are reported. This explains the destructiveHint=true / readOnlyHint=false pairing in concrete terms an agent can act on.

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 purpose and side effect, then usage, then return shape, then fidelity notes, then the output_path tip. Dense but nearly every clause carries information; the error-code enumeration and the long list of unmodeled features are the only mildly heavy passages.

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?

No output schema exists, so the description carries the return-value burden and does so: file or saved_to, plus a summary of formula errors and anything lost on save. Combined with the recalculation disclosure, an agent has everything needed to call it correctly and interpret the result.

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 real meaning: it explains that output_path switches the result from base64 to a saved file (and names saved_to vs file_base64), which the schema states only in passing. It does not elaborate on overwrite semantics, which the schema already covers.

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 ('Get a session's workbook back as an .xlsx file') plus the key transformation ('every formula's computed value saved in it'). This clearly separates it from recalc_workbook, save_to_library, and parse_workbook without the agent needing to open 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Call this when you need the file itself: to give it to the user, or to read it with pandas, openpyxl...' gives an explicit positive trigger and names the downstream consumers. It does not explicitly exclude sibling tools (e.g., when to prefer recalc_workbook for in-session values only), which keeps it from a 5.

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