Skip to main content
Glama

find_feedback_loops

Lists a Vensim model's reinforcing and balancing feedback loops, link polarities, stocks, and algebraic loops, and can annotate diagrams with R/B labels.

Instructions

List the model's feedback loops, each labelled reinforcing (R) or balancing (B).

Each loop lists its variables (starting at a stock), the polarity of every link, and the stocks it passes through. Polarity comes from the equations, assuming positive variables; a loop whose sign depends on values (an IF THEN ELSE condition, a non-monotonic lookup) is 'unknown' and names the undetermined links. Also reports algebraic loops (no stock or delay), which Vensim refuses to simulate.

With annotate=true, writes the link polarities onto the diagram's arrows and places R1/B1 labels inside the loops (up to max_labels), in place with a backup unless output_path is given. Re-running replaces earlier labels.

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>"
    },
    "name": "find_feedback_loops"
  }
}

Input Schema

NameRequiredDescriptionDefault
annotateNo
max_loopsNo
max_labelsNo
model_pathYes
output_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/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 so: it discloses the polarity-derivation assumption (positive variables), the 'unknown' outcome for value-dependent signs with named undetermined links, the separate algebraic-loop reporting Vensim refuses to simulate, and the mutation semantics of annotate=true (in-place with backup unless output_path is given, re-running replaces labels). That mutation/backup disclosure is exactly the behavioral context an agent needs before enabling a write.

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?

Front-loaded with the core purpose, then structured into output semantics and the optional annotation mode. Dense but every sentence adds information; the multi-line layout reads as three logical paragraphs rather than padding, though it could be tightened slightly.

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 five-parameter tool with no annotations and no output schema, the description is nearly complete: it describes the return content (variables, per-link polarity, stocks traversed) and the annotate side effects. The only gaps are max_loops and the exact return shape for algebraic loops.

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 coverage is 0%, so the description must compensate, and it explains four of five parameters: annotate (writes polarities onto arrows and places R1/B1 labels), max_labels (label cap), output_path (suppresses in-place write, hence backup), and model_path by implication. max_loops is never mentioned, leaving one parameter's effect undocumented in both schema and description.

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 ('List the model's feedback loops') and immediately defines the output vocabulary (reinforcing R / balancing B). It goes further to describe what each loop contains, so an agent knows exactly what this tool produces versus the model-editing siblings.

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?

Usage is implied rather than stated: the description explains the annotate=true mode, the max_labels cap, and that re-running replaces earlier labels, which effectively tells the agent when to use the annotation path. It never names a sibling (e.g. inspect_vensim_model) or states exclusions, so the agent must infer that this is the analysis tool rather than the inspection one.

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