- OPERATORS
- CONTROLLERS
Tool TD Mod
v1.0.0newtool_td_mod gives an Agent a structured module interface for TouchDesigner work. Use it when you want agents to inspect documentation, read source, and call curated Python functions instead of executing arbitrary code directly.
What It Does
Section titled “What It Does”The operator exposes one tool whose name is built from Tool Prefix and Tool Name. The tool supports four actions: list available modules, inspect module/function docs, read module/function source, and call a typed module function with arguments.
Modules come from bundled mod_* text DATs inside the operator and, optionally, text DATs inside External Modules COMP. Strip Prefix controls how external DAT names become module names, so a DAT named td_net can be exposed as net.
Typical Workflow
Section titled “Typical Workflow”- Keep Enable Tool on for agents that should use the module surface.
- Set Tool Prefix and Tool Name to make the exposed tool name unique.
- Leave Custom Modules enabled to expose bundled
mod_*modules. - Set External Modules COMP when you want to add project-specific module DATs.
- Adjust Strip Prefix if external modules use a naming convention other than
td_. - Tune Tool Description and Max Output for the agent and model size you are using.
Inputs And Outputs
Section titled “Inputs And Outputs”- Inputs: No connector inputs. Agents call the exposed tool.
- Outputs: No connector outputs. Module results are returned as structured tool responses.
Agent Tool Use
Section titled “Agent Tool Use”tool_td_mod exposes GetTool() when Enable Tool is on. The default tool name is td_mod.
The user-facing capability is a module catalog and invocation surface: agents can list modules, request docs and signatures, read source for a module or function, and call module functions. On call errors, the response includes the target function’s docstring and signature to help the agent correct its next call.
Works Well With
Section titled “Works Well With”agent: Calls the module interface.tool_td_code: Provides a raw Python fallback for cases not covered by modules.tool_manager: Helps expose the module tool only to agents that need it.
Gotchas
Section titled “Gotchas”- This is an advanced/guided tool. Smaller models usually need strong prompting to use module and function paths correctly.
- The list action is intentionally compact. Use doc or source for details before calling unfamiliar functions.
- Module names may be stripped; both stripped and unstripped names are tolerated in many cases, but the catalog is the source to follow.
- Max Output truncates long source or call responses.
- External module DATs must load as Python modules before their functions can be listed or called.
Parameters
Section titled “Parameters”op('tool_td_mod').par.Toolprefix Str Prefix for tool name (e.g. td -> td_mod)
- Default:
td
op('tool_td_mod').par.Toolname Str Suffix after prefix. Default td_mod.
- Default:
mod
op('tool_td_mod').par.Enabletool Toggle Master switch. When off, GetTool returns None.
- Default:
True
op('tool_td_mod').par.Maxoutput Int Truncate response text at this char count
- Default:
4000- Range:
- 0 to 1
op('tool_td_mod').par.Tooldescription Str Base description exposed to agents. Write action appended when enabled.
- Default:
TouchDesigner module surface. Modules are Python namespaces with typed functions — each is executable documentation. list — module catalog with purpose and example call doc — module/function docstrings and signatures source — raw Python source (module or single function) call — invoke module.function with kwargs On error the response embeds the function's docstring and signature for self-correction.
Modules
Section titled “Modules”op('tool_td_mod').par.Enablecustommod Toggle Discover mod_* text DATs inside this operator as modules
- Default:
True
op('tool_td_mod').par.Modulescomp OP OP reference to a COMP containing text DATs (each becomes a module)
- Default:
./modules
op('tool_td_mod').par.Stripmodprefix Str Strip this prefix from external module names (empty to keep full name)
- Default:
td_
Changelog
Section titled “Changelog”v1.0.02026-05-02
- added docs/compose.json - added changelog and releases directory placeholders
- stripped write feature (4 params, _mod_write method, source schema property) - updated category to Controllers
- Initial tool_td_mod structure