Skip to main content
Glama

set_vensim_equation

Update a variable's equation, unit, or note in an existing .mdl file while preserving the model diagram; optionally sync information arrows and write to a new path.

Instructions

Change a variable's equation, unit or note in an existing .mdl, keeping the diagram.

Leave a field as null to keep it. With sync_links, information arrows into the variable are added for newly used variables and removed for ones no longer used. Writes the model in place (a backup is kept) unless output_path is given. If the model is open in Vensim, reopen it afterwards without saving.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "model_path": "<model_path>",
      "variable": "<variable>"
    },
    "name": "set_vensim_equation"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNo
unitNo
equationNo
variableYes
model_pathYes
sync_linksNo
output_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the in-place write, that a backup is kept, that output_path redirects the write, and the important operational caveat that an open model must be reopened without saving. It stops short of stating what happens if the variable does not exist or whether the model is validated before writing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the action and scope, then null semantics, then the link-sync flag, then write behavior and the Vensim-open caveat. No sentence is redundant and the ordering follows the order an agent needs the information.

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 seven-parameter mutation tool with no annotations and no output schema, the description covers the risky parts: mutation mode, backup, backup-free alternative path, link synchronization, and the external-application caveat. It could still say what is returned (e.g., a change summary) or how failures on a nonexistent variable are reported.

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 description coverage is 0%, so the description must compensate, and it explains six of seven parameters: variable, equation/unit/note with null-means-keep semantics, sync_links (arrows added for newly used variables, removed for unused ones), and output_path versus in-place writing. Only model_path and the expected equation string syntax are left implicit.

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 ('Change a variable's equation, unit or note in an existing .mdl') plus a scoping constraint ('keeping the diagram'), which distinguishes it from add_vensim_variable, rename_vensim_variable and delete_vensim_variable without naming them. An agent can tell this is an in-place edit of an existing variable, not creation or rename.

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 clear operating context: fields left null are preserved, sync_links controls arrow bookkeeping, and output_path switches from in-place write to a copy. What is missing is explicit when-not guidance or naming of the sibling to use instead for creating or renaming variables.

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