Skip to main content
Glama

Create Python DAT

create_python_script
Destructive

Creates a TouchDesigner DAT node containing Python code, with options for text, execute, or script type.

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
parent_pathYesParent COMP to create the DAT inside.
nameNoName for the new DAT; auto-generated when omitted.
codeYesPython source to place in the DAT.
dat_typeNoKind of DAT: 'text' (plain), 'execute' (event hooks), or 'script' (table builder).text
Behavior4/5

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

The description adds useful behavioral context beyond annotations, such as the Script DAT's companion callbacks DAT and the read-only nature of its own text. Annotations already provide destructiveHint: true, so the description complements without contradiction.

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?

The description is two sentences, front-loaded with the primary action and then detailing variants. It packs significant information efficiently, though the second sentence is slightly dense.

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?

Given the tool has 4 parameters (2 required) and no output schema, the description covers the key behavioral aspects, return value (path to created DAT), and differentiates from a sibling tool. It provides sufficient context for correct usage.

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?

While schema coverage is 100%, the description adds meaning by explaining each dat_type option ('Text DAT (plain code)', 'Execute DAT (event hooks like onFrameStart)', 'Script DAT (table builder)') and clarifying that code for Script DAT goes to the companion callbacks 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 states it creates a DAT node under a parent path with Python code, and distinguishes three types (text, execute, script) with specific behaviors. It also differentiates from sibling tool 'execute_python_script' by stating that this tool only stores code as a node.

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 instructs when to use this tool versus the alternative: 'This only stores code as a node; use execute_python_script instead to run Python immediately against the live project.' This provides clear guidance on avoiding misuse.

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/Pantani/tdmcp'

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