Skip to content

Tool DAT Operator

The Tool DAT operator provides a versatile interface for manipulating both Table and Text DATs within TouchDesigner. It enables users to perform a variety of operations such as appending, inserting, deleting, updating, and finding/replacing content. By linking this operator in the Agent LOP’s Tools parameter page, it can be called by the agent to perform operations on DATs based on user instructions. This allows for dynamic modification and management of data within TouchDesigner projects, enhancing automation and interactivity.

  • None (standard TouchDesigner installation).
  • Must be linked in an Agent LOP’s Tools parameter page to be used by an agent.

None

  • Target DAT (Table/Text): The DAT specified by the Target DAT parameter, which is modified by the operations.
  • Operation Log (Table DAT): Logs operations performed. Columns: Timestamp, Operation, Target, Status, Details.
Tool Name (Toolname) op('tool_dat').par.Toolname String
Default:
tool_dat1
Target DAT (Datselect) op('tool_dat').par.Datselect DAT
Default:
None
DAT Type (Dattype) op('tool_dat').par.Dattype Menu
Default:
table
Options:
table, text
Create If Missing (Createifmissing) op('tool_dat').par.Createifmissing Toggle
Default:
On
Clear Before Call (Clearbeforecall) op('tool_dat').par.Clearbeforecall Toggle
Default:
On
Clear (Clear) op('tool_dat').par.Clear Pulse
Default:
None
Inject Context (Injectcontext) op('tool_dat').par.Injectcontext Toggle
Default:
On
DAT Caption (Caption) op('tool_dat').par.Caption String
Default:
You can use the dat_tool to modify or add to this table DAT.
Format Mode (Contextformat) op('tool_dat').par.Contextformat Menu
Default:
markdown_table
Options:
markdown_table, plain_text
Injection Mode (Injectionmode) op('tool_dat').par.Injectionmode Menu
Default:
append_user_last
Options:
append_user_last, prepend_user_last, insert_before_user, insert_after_user, append_system, prepend_system, add_system_end
Enable Operations (Enableoperations) op('tool_dat').par.Enableoperations Toggle
Default:
On
Enable Append (Enableappend) op('tool_dat').par.Enableappend Toggle
Default:
On
Enable Insert (Enableinsert) op('tool_dat').par.Enableinsert Toggle
Default:
On
Enable Delete (Enabledelete) op('tool_dat').par.Enabledelete Toggle
Default:
On
Enable Update (Enableupdate) op('tool_dat').par.Enableupdate Toggle
Default:
On
Enable Find/Replace (Enablefindreplace) op('tool_dat').par.Enablefindreplace Toggle
Default:
On
Enable Replace All (Enablereplace) op('tool_dat').par.Enablereplace Toggle
Default:
On
Make Operations Required (Makerequired) op('tool_dat').par.Makerequired Toggle
Default:
Off
Max Rows (Maxrows) op('tool_dat').par.Maxrows Integer
Default:
1000
Max Columns (Maxcolumns) op('tool_dat').par.Maxcolumns Integer
Default:
20
Max Characters (Maxchars) op('tool_dat').par.Maxchars Integer
Default:
10000
Enable Logging (Enablelogging) op('tool_dat').par.Enablelogging Toggle
Default:
On
Bypass (Bypass) op('tool_dat').par.Bypass Toggle
Default:
Off
Show Built In Pars (Showbuiltin) op('tool_dat').par.Showbuiltin Toggle
Default:
Off
Version (Version) op('tool_dat').par.Version String
Default:
1.0.0
Last Updated (Lastupdated) op('tool_dat').par.Lastupdated String
Default:
2024-11-06
Creator (Creator) op('tool_dat').par.Creator String
Default:
dotsimulate
Website (Website) op('tool_dat').par.Website String
Default:
https://dotsimulate.com
ChatTD Operator (Chattd) op('tool_dat').par.Chattd OP
Default:
/dot_lops/ChatTD
  • Logging adds overhead; disable if not needed.
  • Very large DATs will consume more memory and may slow down find/replace operations.
  • Context injection adds data to the Agent prompt, potentially increasing token usage.
1. Create a Tool DAT operator.
2. Open the Agent LOP parameters.
3. Go to the 'Tools' page.
4. Drag the Tool DAT operator onto an empty Tool parameter (e.g., Tool 1).
5. Ensure the corresponding 'Enable Tool' toggle is On.
# Assuming the Tool DAT is linked and configured
# Appending to a Table DAT (target is a Table DAT)
"Use the dat_tool named 'tool_dat1' to append a row to the table DAT '/project1/my_table' with the values 'Apple', 'Red', 'Fruit'."
# Updating a Text DAT (target is a Text DAT)
"Use tool_dat1 to update line 3 of the text DAT '/project1/my_text' to 'This is the updated third line'."
# Finding and Replacing in a Table DAT
"Using tool_dat1, find all occurrences of 'Orange' in the table '/project1/fruit_table' and replace them with 'Grapefruit'."
# Replacing entire Text DAT content
"Use tool_dat1 to replace the entire content of '/project1/config_text' with the following:
[Network]
Server=192.168.1.100
Port=9000"
  • Allowing an Agent LOP to dynamically modify data tables.
  • Automating data entry or transformation based on conversation.
  • Managing configuration files or settings via chat instructions.
  • Populating UI elements connected to the target DAT.
  • Creating interactive data manipulation tools driven by natural language.