Skip to main content
Glama

run_macro

Execute STATISTICA BASIC (SVB) macros or .svb files on the active spreadsheet to run custom models (DWLS/Lowess/EWPR), with optional result saving.

Instructions

Execute STATISTICA BASIC (SVB) source code (or a .svb file) with the opened spreadsheet as ActiveSpreadsheet, then optionally save the result. Use it for custom recurrent models (DWLS/Lowess/EWPR) supplied as SVB macros.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoSVB source code, e.g. "Sub Main ... End Sub".
pathNoSpreadsheet to expose as ActiveSpreadsheet inside the macro.
saveNoOptional destination .sta path to persist the modified sheet.
sheetNo
attachNoAttach to the already-running STATISTICA instance and edit it live (no new process, the app is not closed).
sourceNoPath to a .svb file (alternative to code).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.3.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It discloses the ActiveSpreadsheet binding and that the result can optionally be persisted, which is useful. But for arbitrary-code execution it omits side effects, process lifecycle (partly in the schema's 'attach' description), failure behavior, and any permission or safety caveats.

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?

Two sentences, front-loaded with the action and execution context before the use-case scoping. No filler, though the parenthetical acronym list is dense and the sentence could be split for readability.

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

Completeness3/5

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

For a 6-parameter, annotation-free, code-executing tool with no output schema, the description covers purpose and the core binding but leaves behavioral risk (side effects, error handling, what happens to the active spreadsheet on failure) unaddressed. Adequate but with clear gaps.

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 83%, so the schema already documents most parameters well. The description only adds the code-vs-source-file alternative and the optional nature of save, which the schema largely conveys on its own. Baseline 3 is appropriate.

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 (Execute) and resource (SVB source code / .svb file), and specifies the execution context (opened spreadsheet as ActiveSpreadsheet) plus the optional save step. The final sentence distinguishes it from the run_analysis family by naming its niche: custom recurrent models (DWLS/Lowess/EWPR) supplied as SVB macros.

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?

Gives a clear when-to-use signal ('custom recurrent models ... supplied as SVB macros'), which is more than most siblings offer. It does not, however, state when NOT to use it or explicitly route to run_analysis for built-in modules, so the boundary is implied rather than enforced.

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