Skip to main content
Glama

execute_python

Run arbitrary Python code inside Houdini as a last resort when no dedicated tool exists for hou.* API calls or Python-level state.

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. Changed1 schema field changedv2.24.1
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description must carry the behavioral burden, and it does meaningfully: it discloses that this runs arbitrary code with unrestricted hou.* access, that a written justification is mandatory, and how results are retrieved via return_expression. It does not, however, state anything about side-effect persistence, sandboxing, error/exception behavior, or what happens on failure.

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 critical constraint ('LAST RESORT only') before the bullet list, and the bullets are scannable. Slight redundancy between the opening line and the closing 'ONLY use this when...' restatement, but overall dense and well organized.

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 three-parameter escape-hatch tool with no annotations and no output schema, the description covers purpose, routing, gating policy, and all parameters. It could say more about return value shape or execution environment limits, but nothing essential for correct invocation is missing.

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 description coverage is 0%, so the description must compensate, and the Args block documents all three parameters: code as Python source, justification as the required rationale, and return_expression as a post-execution expression. It lacks detail on return_expression syntax or code size limits, but the semantic intent of each parameter is clear.

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 ('Execute arbitrary Python code inside Houdini') and immediately scopes it as a LAST RESORT. The do-not-use list names the exact sibling tools that cover each neighboring capability, so an agent can distinguish this tool from build_network, create_wrangle, connect_nodes, etc. without opening 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 Guidelines5/5

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

Explicit when-not-to-use routing for five categories of operation, each paired with the correct alternative tool, plus a positive trigger ('ONLY use this when no dedicated tool exists... hou.* API calls or Python-level state'). The mandatory justification requirement reinforces the gating condition. This is textbook when/when-not/alternatives 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