Skip to main content
Glama
FlexSim MCP Server

FlexSim MCP Server

by fateedit

deploy_handler

Deploy a custom FlexScript handler to a FlexSim model by copying a template, assigning a new name and code; changes apply immediately in memory and require Ctrl+S to persist.

Instructions

★ 核心:向目标模型部署(复制)一个新 handler(功能)。copy_handler=&value=模板&name=新名&code=新代码。业务参数必须用通用名(value/action/name/msg),绝不能读取 handler 自身名字的参数。部署后立即生效(仅当前实例内存),持久化需用户在 FlexSim 界面 Ctrl+S。部署成功后应调用一次验证。

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": {
      "name": "<name>",
      "code": "<code>"
    },
    "name": "deploy_handler"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesFlexScript 代码:param(1)=回复节点 replyNode,param(2)=请求树 parsedRequestNode;用 node("GET/value", parsedRequestNode) 读参数;结束时 setnodestr(replyNode, "<status>success</status>...") 并 return replyNode
nameYes新 handler 名(小写字母数字,如 setqueuesize)
templateNo源模板 handler 名,默认 template(参数无关写节点版)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.5/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so well: it discloses that deployment is an in-memory, current-instance-only change, that persistence requires a manual UI save by the user, and that a verification call should follow. It also warns that business parameters must use generic names (value/action/name/msg) rather than the handler's own name, which is a non-obvious behavioral constraint.

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 action and reasonably tight. The embedded query-string fragment partially duplicates the schema's parameter names and slightly clutters the prose, but it conveys the invocation shape efficiently.

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 3-parameter mutation tool with no annotations and no output schema, the description covers the essential behavior: what is copied, where it takes effect, persistence, and post-deploy verification. It does not cover collision/overwrite behavior when the name already exists or how failures are reported, which are the remaining gaps.

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 100%, so the baseline is 3, but the description adds real value by showing the concrete invocation mapping (copy_handler=&value=template&name=newname&code=newcode) and by clarifying that callers pass parameters under generic names. The template default of 'template' is also reinforced in prose.

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 — deploy (copy) a new handler into the target model — plus the mechanism (copying from a template). This clearly separates it from siblings like call_handler and list_handlers without the agent needing to open any schema.

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 explicit post-use guidance: call a verification once after a successful deploy, and have the user press Ctrl+S in the FlexSim UI for persistence. It does not name alternatives for other editing paths (e.g. write_node, call_handler), so when-not-to-use is left implicit.

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