Skip to main content
Glama

set_formula

Assign a formula to a STATISTICA variable and recompute it to inspect results; use attach=true to write changes into a running STATISTICA window.

Instructions

Assign a formula to a variable (STATISTICA keeps it in the variable long name) and recompute it, e.g. formula "=v9*v10". The result values are returned for inspection. Use attach=true to write into the running STATISTICA window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the source file.
saveNoOptional destination .sta path.
sheetNo
attachNoAttach to the already-running STATISTICA instance and edit it live (no new process, the app is not closed).
formulaYesFormula without or with a leading "=", e.g. "v9*v10".
variableYesTarget variable (name or 1-based index).
recalculateNoRecompute the variable after assignment. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.3.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses useful traits: the formula is stored in the variable long name, the variable is recomputed, result values are returned for inspection, and attach edits a live instance without a new process. It omits save/permission semantics and what happens to the file when attach is false.

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?

Three tight sentences with the core action front-loaded, followed by the storage/recompute detail and the attach guidance. No filler; each sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description compensates by stating that result values are returned and by explaining the attach behavior. Remaining gaps around persistence/permissions are minor given the rich schema.

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 coverage is 86%, so the schema already documents nearly all parameters including the formula example. The description reinforces the formula syntax and explains attach's live-edit behavior, but adds little that the schema lacks. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Assign a formula to a variable') plus the side effect ('recompute it') and where STATISTICA stores it. It is clearly distinguishable from siblings like recode or write_variables, though it never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Provides one concrete conditional ('Use attach=true to write into the running STATISTICA window'), which tells the agent when to attach vs. run detached. However it offers no guidance on when to choose this tool over siblings like recode or write_variables, so usage is only partially covered.

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