Skip to main content
Glama

TD Run Python (live, UNSAFE)

td_run_python

Executes arbitrary Python code in a running TouchDesigner project via td_mcp bridge. Use for ad-hoc tasks not covered by structured live-control tools; requires the bridge's "Allow Python" flag to be enabled.

Instructions

Run ARBITRARY Python code inside a running TouchDesigner instance via the td_mcp bridge. WARNING: this is arbitrary code execution with full access to the TouchDesigner project and the host Python environment. It is DISABLED BY DEFAULT and only succeeds when the bridge's "Allow Python" flag is explicitly turned on; otherwise the bridge rejects the request. Prefer the structured live-control tools (td_build_template, td_set_parameter, td_connect, td_list_network, ...) for normal operations and only use this for ad-hoc Python that those cannot express. Returns stdout / the returned value plus any errors, warnings and scriptErrors from the bridge.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython source to execute in TouchDesigner. Runs in the project's Python context (td module available: op, ops, project, absTime, etc.). Only runs if the bridge's "Allow Python" flag is enabled.
Behavior5/5

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

No annotations exist, so description carries full burden. Warns about arbitrary code execution with full project and host environment access, explains disable-by-default behavior, and describes return content (stdout, value, errors). This fully discloses essential behavioral traits.

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?

Compact and well-structured: purpose, warning, usage guidance, return content all in a few sentences. No wasted words—every sentence earns its place.

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?

Given no output schema, the description covers return values and error types. Explains execution environment and failure conditions. Complete for a simple one-parameter tool with no nested outputs.

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?

Single parameter 'code' has schema description with Python context details. The description adds environment context (td module available) and repeats the Allow Python flag condition, adding value beyond the schema. With 100% schema coverage, baseline is 3; the extra context justifies a 4.

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?

Clearly states the tool runs arbitrary Python code in a TouchDesigner instance. The verb 'run', resource 'Python code', and scope 'arbitrary' and 'inside a running TouchDesigner instance' are explicit. Distinguishes from sibling live-control tools by naming them as preferred alternatives.

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?

Explicitly advises when to use (ad-hoc Python not expressible by other tools) and when not to use (prefer structured tools for normal operations). Also notes the tool is disabled by default and requires explicit 'Allow Python' flag, providing critical context for invocation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bottobot/touchdesigner-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server