Skip to content
  1. OPERATORS
  2. CONTROLLERS

Tool TD Mod

v1.0.0new

tool_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.

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.

  1. Keep Enable Tool on for agents that should use the module surface.
  2. Set Tool Prefix and Tool Name to make the exposed tool name unique.
  3. Leave Custom Modules enabled to expose bundled mod_* modules.
  4. Set External Modules COMP when you want to add project-specific module DATs.
  5. Adjust Strip Prefix if external modules use a naming convention other than td_.
  6. Tune Tool Description and Max Output for the agent and model size you are using.
  • Inputs: No connector inputs. Agents call the exposed tool.
  • Outputs: No connector outputs. Module results are returned as structured tool responses.

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.

  • 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.
  • 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.
Tool Prefix (Toolprefix) op('tool_td_mod').par.Toolprefix Str

Prefix for tool name (e.g. td -> td_mod)

Default:
td
Tool Name (Toolname) op('tool_td_mod').par.Toolname Str

Suffix after prefix. Default td_mod.

Default:
mod
Enable Tool (Enabletool) op('tool_td_mod').par.Enabletool Toggle

Master switch. When off, GetTool returns None.

Default:
True
Max Output (Maxoutput) op('tool_td_mod').par.Maxoutput Int

Truncate response text at this char count

Default:
4000
Range:
0 to 1
Tool Description (Tooldescription) 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.
Custom Modules (Enablecustommod) op('tool_td_mod').par.Enablecustommod Toggle

Discover mod_* text DATs inside this operator as modules

Default:
True
External Modules COMP (Modulescomp) op('tool_td_mod').par.Modulescomp OP

OP reference to a COMP containing text DATs (each becomes a module)

Default:
./modules
Strip Prefix (Stripmodprefix) op('tool_td_mod').par.Stripmodprefix Str

Strip this prefix from external module names (empty to keep full name)

Default:
td_
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