flexsim_compile
Check FlexScript code for errors in FlexSim simulation models to ensure reliable model execution and analysis.
Instructions
Compile the model (check for FlexScript errors).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "flexsim_compile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- mcp_server/flexsim_mcp.py:476-483 (handler)The flexsim_compile tool handler that checks the FlexSim model for script errors by calling compilemodel() through FlexScript evaluation
async def flexsim_compile() -> str: """Compile the model (check for FlexScript errors).""" try: controller = await get_controller() result = controller.evaluate("compilemodel()") return f"✓ Compilation complete: {result}" except Exception as e: return format_error(e) - mcp_server/flexsim_mcp.py:475-475 (registration)MCP tool registration decorator that registers flexsim_compile as an available tool in the FastMCP server
@mcp.tool()