Skip to main content
Glama

Create Python DAT

create_python_script
Destructive

Create a TouchDesigner DAT node preloaded with your Python code, choosing between text, execute, or script types. Stores code as a node for later execution.

Instructions

Create one DAT under parent_path preloaded with your Python code. dat_type chooses a Text DAT (plain code), an Execute DAT (event hooks like onFrameStart), or a Script DAT (table builder); for a Script DAT the code is written to its auto-created companion callbacks DAT, since the Script DAT's own text is read-only. Returns the created DAT's path. This only stores code as a node; use execute_python_script instead to run Python immediately against the live project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython source to place in the DAT.
nameNoName for the new DAT; auto-generated when omitted.
dat_typeNoKind of DAT: 'text' (plain), 'execute' (event hooks), or 'script' (table builder).text
parent_pathYesParent COMP to create the DAT inside.
Behavior5/5

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

Discloses key behavioral nuances beyond annotations: Script DAT's read-only text and the auto-created companion callbacks DAT, that it only stores code, and that it returns the created DAT's path. This is significant context not captured by the structured fields.

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?

Three sentences, front-loaded with the core action, and each sentence provides necessary details without redundancy. It efficiently covers creation, options, a caveat, and a pointer to the alternative tool.

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?

For a tool with no output schema, the description adequately explains the return value (path), the behavior across all dat_type variants, and the relationship to execute_python_script. It is complete enough for an agent to select and invoke correctly.

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?

While schema covers 100% of parameters, the description adds meaning by explaining dat_type with concrete examples (Text, Execute, Script) and the special behavior for Script DAT. It also clarifies that name is auto-generated when omitted, and that code goes into the DAT.

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 clearly specifies the action (create), the resource (DAT node), and the scope (under parent_path preloaded with code). It distinguishes itself from siblings by naming execute_python_script as the alternative for immediate execution, and explains the different DAT types.

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 states when to use this tool (storing code as a node) and when not to (use execute_python_script to run Python immediately). Also clarifies the use case for each dat_type (Text, Execute, Script) with examples like onFrameStart and table builder.

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/lucasmaher-hash/touch-designer-mcp'

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