Skip to main content
Glama
tbrito88
by tbrito88

Execute Code

execute_code
Destructive

Run Python code in Fusion 360 to automate CAD tasks; the last expression's value is returned, and optional timeout handles long-running scripts.

Instructions

Run arbitrary Python in Fusion 360. The last expression's value is returned (REPL-style). Pre-defined names: app, ui, design, component, adsk, math, late_results. The add-in waits 30 s by default; pass timeout_s (max 600) for a script that runs many features on a large timeline. A command that times out while running still finishes; its result is kept and late_results() returns it. Unless a parameter says otherwise, lengths and coordinates are in cm (not mm) and angles in degrees.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
timeout_sNoSeconds to wait for the script (default 30).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare the safety profile (destructive, non-idempotent). The description goes well beyond that: it discloses the REPL return convention, the pre-injected names (app, ui, design, component, adsk, math, late_results), the 30 s default wait, and the non-obvious fact that a timed-out command still completes and its result is retrievable via late_results(). That timeout semantics detail is exactly the kind of behavior an agent cannot infer elsewhere.

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?

Dense but front-loaded: purpose, return convention, available names, timeout behavior, then units. Every sentence carries information, though the late_results clause is stated twice in slightly different terms.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but the description defines the return convention (last expression value, late_results) so the agent knows what it will get back. For an arbitrary-code tool with no annotations covering behavior, this covers the semantics an agent needs to call it safely and interpret results.

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 50% (timeout_s documented in schema, code not). The description compensates by explaining the timeout behavior, the 600 s ceiling in context, and adding unit conventions (cm, degrees) that govern the free-form code parameter. It does not describe any constraint on the code string itself.

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 ('Run arbitrary Python in Fusion 360') and immediately narrows the semantics with 'REPL-style' return behavior. This clearly separates it from every sibling, all of which are narrow CAD operations.

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?

It explains when to raise timeout_s ('a script that runs many features on a large timeline'), but never states when to prefer this escape hatch over the dedicated siblings like extrude or fillet, nor any when-not-to-use conditions. Usage is implied rather than guided.

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