Skip to main content
Formulas belong to saved Variables, and calculated values appear in saved Table Blocks. The user-visible Model is the source of truth for both human and agent work.

Match the tool to the question

  • Use inspect_variables with saved_formulas to read the rules attached to a Variable.
  • Use inspect_table_blocks to inspect saved values, visible row and column references, formula origins, and source information.
  • Use edit_table_blocks when the user wants to create or update a formula on a visible row, column, or cell.
  • Use edit_variables with action: "set_values" for a genuinely Model-wide or table-independent formula.
  • Use dry_run: true on a supported write when the user asks for validation without a saved change.
A question that can be answered from existing values stays read-only. A new calculated result requires a visible, saved Model rule and the user’s authorization to create it.

Start from the visible artifact

Inspect the relevant Table Block once, reuse its returned row and column references, and send related edits together. The server derives the actual Variable, formula scope, time range, and write permissions from that visible target. When the work has no table target, inspect the existing Variables and Dimensions first. Reuse their returned grammar references when composing a formula. Write expressions with readable Variable names. Use backticks for names containing spaces, punctuation, operators, or reserved words, and use the returned short disambiguator only when names collide.

Respect scenario context

Formulas are Scenario-scoped. Use the current Scenario or the Scenario the user requested. If a write could reasonably target more than one Scenario, resolve that choice before changing the Model.

Separate condition and expression

The condition determines where the formula applies. The expression determines what it calculates. For a visible table edit, the server derives the condition from the selected target. For a headless rule, provide the intended condition, segments, period, or grain directly.

Verify outcomes

A syntactically valid formula can still express the wrong business rule. After a material write, inspect the saved Table Block and compare representative periods and segments with the user’s intent.