flexsim-console-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FLEXSIM_EXE | No | Full path to flexsim.exe. Default: C:\Program Files\FlexSim 2022 Update 1\program\flexsim.exe | C:\Program Files\FlexSim 2022 Update 1\program\flexsim.exe |
| FLEXSIM_MODEL | No | Default model .fsm path. No default; a model can instead be passed to flexsim_new_session via the model parameter. | |
| FLEXSIM_RESP_DIR | No | Temporary directory for response files. Default: <system temp directory>/flexsim-console-mcp | |
| FLEXSIM_DEBUG_LOG | No | Optional: mirror raw console output to a file for troubleshooting. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
FlexSim 无头控制(FlexScript 控制台通道)。典型流程:flexsim_new_session → flexsim_create_object (Source S1 → Queue Q1 → Processor P1 → Sink K1) → flexsim_connect 串联 → flexsim_set_variable_code 设 interarrivaltime/cycletime(代码形式,如 "return 1;")→ flexsim_set_stoptime → flexsim_reset → flexsim_run_steps 步进 → flexsim_get_stat 读 Output/Input/Content → flexsim_save_model 存档。对象名必须 ASCII;参数修改后必须 reset;仿真推进用 run_steps(控制台无消息循环)。
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| flexsim_new_sessionB | 启动 FlexSim 控制台会话(加载模型)。已存在则复用。model:模型 .fsm 路径(或环境变量 FLEXSIM_MODEL)。 |
| flexsim_close_sessionB | 关闭当前会话。 |
| flexsim_statusB | 检查会话:返回仿真时间与模型对象数。 |
| flexsim_create_objectB | 创建对象(Source/Queue/Processor/Sink/Combiner/Separator/MultiProcessor/Conveyor/Dispatcher/Operator/Transporter/Elevator/Robot),命名(ASCII),返回实际名字。 |
| flexsim_connectC | 把 from 的输出连到 to 的输入。 |
| flexsim_set_variable_codeB | 替换对象变量为自定义 FlexScript 代码并编译(interarrivaltime=到达间隔、cycletime=加工时间等)。例:code="return 1;" 或 "return exponential(0,5,getstream(current));"。修改后需 reset。 |
| flexsim_set_numberC | 设置对象数值变量(setvarnum,存档层)。 |
| flexsim_set_stoptimeC | 设置模型停止时间。 |
| flexsim_resetA | 复位模型(统计清零、事件重排)。参数修改后必须复位才生效。 |
| flexsim_run_stepsA | 手动步进 N 个事件(每步约一个实体)。控制台模式没有消息循环,靠步进推进仿真。返回步进后仿真时间。 |
| flexsim_get_statC | 读对象统计当前值(STAT_CURRENT)。stat 用 Output/Input/Content/Staytime/State。 |
| flexsim_get_timeB | 读当前仿真时间。 |
| flexsim_list_objectsB | 列出模型中的对象名字。 |
| flexsim_set_nameC | 给对象改名(ASCII)。 |
| flexsim_save_modelC | 把当前模型保存为 .fsm(可用 GUI 打开查看)。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 15 tools
Most tools map to a clearly distinct action (create_object, connect, reset, run_steps, save_model). There is mild overlap between flexsim_status (returns sim time + object count), flexsim_get_time, and flexsim_get_stat, and between flexsim_set_variable_code and flexsim_set_number, but the descriptions make the intended selection reasonably clear.
All tools share a flexsim_ prefix and overwhelmingly use a verb_noun pattern (create_object, set_name, get_stat, run_steps, save_model). Minor deviations such as flexsim_status (noun-only) and flexsim_set_stoptime (inconsistent compound) are readable but break the pattern slightly.
15 tools is a reasonable surface for driving a simulation console, covering sessions, model building, parameter setting, stepping and querying. It sits near the upper end of the sweet spot, and a couple of tools (status vs get_time) could arguably be merged.
Core lifecycle is present (new/close session, create, connect, set parameters, reset, step, stat, save), but there is no delete/remove-object or disconnect operation, and simulation can only advance via manual run_steps rather than a run-until-stoptime call. These gaps force awkward workarounds for editing models or running long simulations.