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 calc settings

set_calc_settings
Idempotent

Turn iterative calculation on or off for an Excel session and recalculate so circular models converge; exported workbooks keep the same settings.

Instructions

Turn iterative calculation on or off for a session and recalculate. Needed for circular models (e.g. development pro formas where loan size depends on cost, which includes the loan's interest and fees): with it on, set_inputs re-converges the loop on every call. Saved with the session's next commit (restore_session to an earlier commit rolls it back) and written to the workbook, so an exported xlsx iterates in Excel too. Returns {calc, recalc}: the settings now in force and whether the model converged.

Input Schema

NameRequiredDescriptionDefault
iterativeYesEnable iterative calculation (Excel: Enable iterative calculation)
max_changeNoConverged once no value moves more than this (Excel default 0.001)
session_idYesSession ID returned by create_session (list_sessions shows the open ones)
max_iterationsNoMaximum passes (Excel default 100)

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.4/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses persistence semantics (saved with the session's next commit), the rollback path (restore_session to an earlier commit), and that the setting is written into the exported workbook so Excel iterates too. It also states the return payload {calc, recalc} and what each means, which no output schema covers.

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?

The primary behavior is front-loaded in the first clause, followed by necessity, persistence, and return value in a logical order. The parenthetical circular-model example is long but earns its place by making the use case concrete; a small trim would improve it.

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?

For a four-parameter settings mutation with no output schema, the description covers purpose, precondition, persistence/rollback, and return shape. Nothing an agent needs in order to call this correctly and interpret the result is missing.

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

Parameters3/5

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

Schema description coverage is 100% and each of the four parameters is documented in-schema, including Excel-default hints for max_change and max_iterations, so the baseline is 3. The description adds no further semantics about the tolerance or iteration-cap parameters beyond what the schema already says.

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 ('turn iterative calculation on or off for a session') plus the recalculation side effect, which separates it from recalc_workbook and set_inputs. An agent can tell what it does and what it does not do without opening the 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?

Explicitly names the triggering condition — circular models such as development pro formas where loan size depends on cost — and explains the interaction with set_inputs (loop re-converges on every call). It stops short of an explicit when-not-to-use rule (e.g. 'leave off for acyclic models'), so it is strong context rather than a full routing rule.

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