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

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

Official

Set inputs

set_inputs
DestructiveIdempotent

Write values or formulas into session cells and recalculate to run what-if scenarios; targets are overwritten, so commit first if you need undo.

Instructions

Write values or formulas into cells of a session and recalculate: the way to run a scenario on a model ("what if Revenue is 1.2M?"). Keys are defined names (e.g. "Revenue") or cell refs ("B4" on the active sheet, "Sheet1!A1"); values are numbers, booleans (logical TRUE/FALSE), error codes such as "#N/A", text, or a string starting with "=" to store a formula. Whatever the target cells held before is overwritten, so call commit_session first if you may want restore_session to undo it. The batch is all or nothing: a key that isn't a defined name or valid ref, or a formula that can't be stored, fails the call with invalid_input and no cell is written. Returns {applied, recalc, effects}: the cells written, recalc stats (with a warning for circular references that didn't converge) and each defined name whose value changed, with before and after. Read other results with get_outputs; to try a formula without touching the workbook use evaluate_formula; to create a name use define_variable.

Input Schema

NameRequiredDescriptionDefault
inputsYesMap of defined name or cell ref to value; a string starting with "=" is stored as a formula. Example: {"Revenue": 1000000, "Sheet1!B4": "=B2*1.1"}
session_idYesSession ID returned by create_session (list_sessions shows the open ones)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.2
    • changedInput schema / properties / inputs / description
      Previous value: -"Map of name-or-ref to value. Example: {\"Revenue\": 1000000}"New value: +"Map of defined name or cell ref to value; a string starting with \"=\" is stored as a formula. Example: {\"Revenue\": 1000000, \"Sheet1!B4\": \"=B2*1.1\"}"
    • 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.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, but the description earns its keep by specifying exactly what is destroyed ("Whatever the target cells held before is overwritten"), the all-or-nothing transaction semantics, the invalid_input failure mode, and the shape of the response {applied, recalc, effects} including a circular-reference warning. That is behavior beyond what the annotations convey.

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?

No wasted sentences and the core action is front-loaded, but it is delivered as one dense paragraph mixing semantics, safety warnings, error behavior, return shape, and sibling routing. Splitting those concerns would make it easier to scan without adding length.

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, so the description carries the return-value burden and does so ({applied, recalc, effects} with before/after for changed names). For a destructive, nested-object mutation tool, the safety, atomicity, and error contract are all covered.

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 carries the baseline, yet the description still adds meaning: keys may be defined names or refs with an active-sheet default and cross-sheet syntax ("Sheet1!A1"), and value types include error codes such as "#N/A". It partially repeats the schema's "=" formula convention, which keeps it just short of a 5.

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 ("Write values or formulas into cells of a session and recalculate") and adds a concrete scenario ("what if Revenue is 1.2M?"). It also distinguishes itself from the sibling readers/writers it could be confused with (get_outputs, evaluate_formula, define_variable).

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?

Gives explicit routing rules: use get_outputs to read results, evaluate_formula to test a formula without touching the workbook, define_variable to create a name, and commit_session first if restore_session may be needed. When-to-use and when-to-use-something-else are both stated rather than implied.

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