Run a FreeCAD macro by name. Args: macro_name: Name of the macro to run (without .FCMacro extension). args: Optional dictionary of arguments to pass to the macro. These will be set as variables before execution. Returns: Dictionary with execution result: - success: Whether macro executed successf...
AI agents invoke run_macro to trigger actions in FreeCAD Robust MCP Server. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.
This tool executes arbitrary code (macros) in the FreeCAD environment. The effects depend entirely on what the macro does—it could modify 3D models, write files, execute shell commands, or perform other side effects. While not inherently destructive or financial, code execution that can trigger unpredictable external operations falls under Execute category.
From the tool's definition Tool description states it 'Run[s] a FreeCAD macro by name' and 'pass[es]' arguments before execution. Macros in FreeCAD are arbitrary code that execute with full application privileges, capable of modifying geometry, files, and system state.
Documented attack patterns abuse exactly the kind of access run_macro gives an agent:
PolicyLayer is an MCP gateway — it sits between your AI agents and FreeCAD Robust MCP Server, and nothing reaches the server without passing your rules. This is the rule we recommend for run_macro:
{
"version": "1",
"default": "deny",
"tools": {
"run_macro": {
"limits": [
{
"counter": "run_macro_rate",
"window": "minute",
"max": 10,
"scope": "grant"
}
]
}
}
} run_macro stays usable, but rate-capped — a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
Free to start. No card required.
Run a FreeCAD macro by name. Args: macro_name: Name of the macro to run (without .FCMacro extension). args: Optional dictionary of arguments to pass to the macro. These will be set as variables before execution. Returns: Dictionary with execution result: - success: Whether macro executed successfully - stdout: Captured standard output - stderr: Captured standard error - execution_time_ms: Execution time in milliseconds - error_type: Error type if failed - error_traceback: Full traceback if failed. It is categorised as a Execute tool in the FreeCAD Robust MCP Server MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
Register the FreeCAD Robust MCP Server MCP server in PolicyLayer and add a rule for run_macro: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches FreeCAD Robust MCP Server. Nothing to install.
run_macro is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the run_macro rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for run_macro. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
run_macro is provided by the FreeCAD Robust MCP Server MCP server (spkane/freecad-addon-robust-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Deterministic rules across all 152 FreeCAD Robust MCP Server tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.
Free to start. No card required.
152 FreeCAD Robust MCP Server tools catalogued and risk-classified — across an index of 42,500+ MCP servers.