Skip to main content
Glama

execute_python

Execute arbitrary Python code in Houdini for operations not covered by dedicated tools. Use only when no other tool can handle the task.

Instructions

Execute arbitrary Python code inside Houdini. LAST RESORT only.

DO NOT use this to:

  • Create nodes or networks → use build_network or create_node

  • Set parameters → use set_parameter or set_parameters

  • Create wrangles or write Python SOPs → use create_wrangle

  • Connect nodes → use connect_nodes or connect_nodes_batch

  • Read geometry → use get_geometry_info, get_points, sample_geometry

ONLY use this when no dedicated tool exists for the operation — i.e. hou.* API calls or Python-level state that no other tool exposes. The justification parameter is mandatory: name the dedicated tools you considered and why none covers this operation.

Args: code: Python source code to execute. justification: Which dedicated tools you considered and why none covers this operation. return_expression: Python expression to evaluate after execution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
justificationYes
return_expressionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It clearly states that execution is arbitrary and implies full Houdini access, but it does not describe side effects, failure modes, or the scope of state changes (e.g., that it can permanently modify the scene). It sets expectations for when to use it but not what executing the code actually entails beyond 'execute arbitrary Python code.' A more explicit warning about potential destructive actions would raise this score.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a bolded opening statement, bullet-point exclusions, and a clear 'Args' section. Every sentence adds value – there is no filler. It front-loads the purpose and constraints, making it easy to scan. The length is justified by the complexity of the tool's usage rules.

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?

The description covers purpose, exclusions, and parameter semantics thoroughly. It could add more on error handling or the execution environment (e.g., 'runs in the current Houdini session'), but for a generic escape-hatch tool, it provides sufficient context for correct invocation. The mandatory justification parameter reinforces the complete usage model.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must explain all parameters. It does so comprehensively: 'code' is described as 'Python source code to execute,' 'justification' as 'Which dedicated tools you considered and why none covers this operation,' and 'return_expression' as 'Python expression to evaluate after execution.' Each parameter gets a clear, meaningful explanation beyond the schema's bare names.

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?

The description opens with 'Execute arbitrary Python code inside Houdini' – a specific verb, resource, and scope. It clearly distinguishes itself from the many sibling tools by explicitly stating it is a last resort and listing what it is NOT for (creating nodes, setting parameters, etc.), which makes its unique purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'DO NOT use this to' list names the exact dedicated alternatives for common operations, and the 'ONLY use this when' clause states the condition for legitimate use. It also requires a justification parameter that forces the agent to explicitly consider alternatives, which is exemplary usage guidance.

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

Deploy Server

Other Tools