Skip to main content
Glama

flexsim_execute_script

Execute FlexScript code in an open FlexSim model and return the result. Requires a bridge node; end with 'return ;' to get output.

Instructions

Execute FlexScript inside the open model and return its result.

Needs the bridge node (see flexsim_bridge_status). End the script with `return <value>;`
to get a value back.

Safety: ArrivalStyle/FlowItemClass writes, PerformanceMeasureTables.addRow and
overwriting bridge/mcp_template.fsm are blocked (they hung or corrupted FlexSim).

Args:
    script: FlexScript code

Examples:
    script='return Model.find("Queue1").subnodes.length;'
    script='return getmodeltime();'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 so well: it names the bridge-node dependency and enumerates the specific blocked operations (ArrivalStyle/FlowItemClass writes, PerformanceMeasureTables.addRow, overwriting bridge/mcp_template.fsm) with the reason they are blocked (they hung or corrupted FlexSim). It stops short of describing general side effects or state mutation semantics.

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 purpose, then prerequisites, safety, args and examples in clearly delineated sections. Information-dense with little waste, though the section labels make it slightly longer than strictly needed.

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?

An output schema exists, so return values need not be explained, and the description still covers the bridge prerequisite, the blocked-operation safety envelope, the parameter, and worked examples. Complete enough for an agent to invoke it correctly, with the only gap being routing versus similar evaluation tools.

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 does: it documents the single `script` parameter as FlexScript code, states the `return <value>;` convention for retrieving output, and provides two concrete example scripts. That adds real meaning beyond the bare schema.

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: execute FlexScript inside the open model and return its result. This is inherently distinct from node-focused siblings like flexsim_get_node_value or flexsim_evaluate_node, but the description never explicitly differentiates itself from those alternatives.

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?

Points to a prerequisite (needs the bridge node, see flexsim_bridge_status) and notes how to get a value back, which is implicit usage guidance. However, it never says when to prefer this tool over siblings such as flexsim_evaluate_node or flexsim_get_node_value.

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

Deploy Server

Other Tools