Skip to content

Tool Request

v1.0.0New

The Tool Request LOP is a generic HTTP request operator that exposes configured API endpoints as tools for LLM agents. It supports GET, POST, PUT, and DELETE methods with URL templating, headers, and body templates - allowing agents to interact with any HTTP API without blocking TouchDesigner.

🔧 GetTool Enabled 1 tool

This operator exposes 1 tool that allow Agent and Gemini Live LOPs to make HTTP requests to configured API endpoints with dynamic parameter substitution.

Each configured endpoint in the sequence becomes a separate tool available to agents. The operator automatically infers parameter schemas from URL and body template placeholders (e.g., {city} in a URL becomes a required city parameter for the agent).

None - endpoints are configured via the parameter panel.

  • Results Table - Full history of all requests with request ID, timestamp, method, URL, status code, response body, and duration
  • Last Response Table - Key-value breakdown of the most recent response
  1. On the Request page, add an endpoint to the ‘Endpoint’ sequence.
  2. Set ‘Name’ to a descriptive identifier (this becomes the tool name for agents).
  3. Enter the ‘url’ with placeholders for dynamic values, e.g., https://api.weather.com/v1/forecast?city={city}.
  4. Set ‘HTTP Method’ to the appropriate method (GET, POST, PUT, or DELETE).
  5. Optionally set a ‘Headers DAT’ pointing to a table with key-value header pairs.
  6. For POST/PUT, set ‘bodytemplate’ with a JSON body using placeholders, e.g., {"query": "{search_term}"}.
  7. Add a ‘Description’ so agents understand what this endpoint does.
  1. On the Test page, set ‘Execute Block’ to the index of the endpoint you want to test.
  2. Pulse ‘Analyze Schema’ to auto-detect parameters from your URL and body templates.
  3. An args table will be created (or referenced from ‘Args Table’) with the detected parameter names.
  4. Fill in test values in the args table.
  5. Pulse ‘Execute Request’ to make the request.
  6. Check the results in the last_response_table DAT and the status parameters.
  1. Configure one or more endpoints as described above.
  2. On the Tool page, toggle ‘Enable Tool’ to On.
  3. Connect this operator to an Agent LOP’s tool inputs (or wire through a Tool Manager).
  4. The agent can now call each enabled endpoint by name, passing the required parameters.
  1. Add multiple blocks to the ‘Endpoint’ sequence for different API calls.
  2. Set each endpoint’s ‘Mode’ to ‘enabled’, ‘disabled’, or ‘forced’.
  3. Each enabled endpoint becomes a separate tool for the agent.
  4. Disabled endpoints are skipped during tool registration.
  • Use descriptive endpoint names and descriptions - agents rely on these to decide which tool to call.
  • Set an appropriate ‘Timeout (seconds)’ on the Request page to avoid hanging on slow APIs.
  • Use the ‘Headers DAT’ for authentication tokens (e.g., Bearer tokens) to keep credentials out of URL templates.
  • Pulse ‘Clear Results’ periodically to keep the results table manageable.
  • Request fails immediately - Check that the URL is correctly formed and any placeholder parameters are being substituted. Pulse ‘Analyze Schema’ to verify detected parameters.
  • Authentication errors (401/403) - Ensure your headers DAT includes the correct authorization headers.
  • Timeout errors - Increase the timeout value or check that the target API is reachable from your network.
Timeout (seconds) (Timeout) op('tool_request').par.Timeout Int

Request timeout in seconds

Default:
0
Range:
1 to 300
Slider Range:
1 to 300
Execute Request (Execute) op('tool_request').par.Execute Pulse

Execute the HTTP request

Default:
False
Status (Status) op('tool_request').par.Status Str

Current request status

Default:
"" (Empty String)
Last Status Code (Laststatuscode) op('tool_request').par.Laststatuscode Int

HTTP status code from last request

Default:
0
Range:
0 to 1
Slider Range:
0 to 1
Last Duration (s) (Lastduration) op('tool_request').par.Lastduration Float

Duration of last request in seconds

Default:
0.0
Range:
0 to 1
Slider Range:
0 to 1
Response Type (Responsetype) op('tool_request').par.Responsetype Str

Content type of last response

Default:
"" (Empty String)
Clear Results (Clearresults) op('tool_request').par.Clearresults Pulse

Clear all request history

Default:
False
Endpoint (Endpoint) op('tool_request').par.Endpoint Sequence
Default:
0
Mode (Endpoint0mode) op('tool_request').par.Endpoint0mode Menu
Default:
enabled
Options:
disabled, enabled, forced
Name (Endpoint0name) op('tool_request').par.Endpoint0name Str
Default:
"" (Empty String)
url (Endpoint0url) op('tool_request').par.Endpoint0url Str
Default:
"" (Empty String)
HTTP Method (Endpoint0method) op('tool_request').par.Endpoint0method Menu

HTTP method to use

Default:
GET
Options:
GET, POST, PUT, DELETE
Headers DAT (Endpoint0headersdat) op('tool_request').par.Endpoint0headersdat DAT

Table DAT with header key-value pairs

Default:
"" (Empty String)
bodytemplate (Endpoint0bodytemplate) op('tool_request').par.Endpoint0bodytemplate Str
Default:
"" (Empty String)
Description (Endpoint0description) op('tool_request').par.Endpoint0description Str
Default:
"" (Empty String)
Execute Block (Executeblock) op('tool_request').par.Executeblock Int

Select which endpoint block to test

Default:
0
Range:
0 to 10
Slider Range:
0 to 10
Analyze Schema (Analyzeschema) op('tool_request').par.Analyzeschema Pulse

Infer parameters and generate test args table

Default:
False
Args Table (Argsdat) op('tool_request').par.Argsdat DAT

Table DAT with parameter names and values (auto-created if empty)

Default:
"" (Empty String)
Enable Tool (Enabletool) op('tool_request').par.Enabletool Toggle

Master switch to expose endpoints to agent

Default:
False
v1.0.02025-12-06

## tool_request v1.0.0 - Initial Release

Generic HTTP Request operator with three-tier usage for agents, parameters, and Python API.

Features

Three Usage Modes:

  • Python API: Direct Request() method with optional callbacks for any script DAT
  • Parameter-Based Testing: Configure endpoints via sequence parameters, test manually with Execute pulse
  • Agent Tool Exposure: Each endpoint becomes a separate tool via GetTool() integration

HTTP Methods:

  • GET, POST, PUT, DELETE support
  • All methods use central async handler (TDAsyncIO) - never blocks TouchDesigner

Endpoint Sequence Configuration:

  • Endpoint{i}name: Tool name for agent exposure
  • Endpoint{i}url: URL template with {placeholder} substitution
  • Endpoint{i}method: HTTP method (GET/POST/PUT/DELETE)
  • Endpoint{i}description: Tool description for agents
  • Endpoint{i}headersdat: Optional headers table DAT reference
  • Endpoint{i}bodytemplate: Request body with {placeholder} substitution
  • Endpoint{i}mode: enabled/disabled

Schema Analysis:

  • Analyzeschema pulse auto-detects {placeholder} parameters from URL and body templates
  • Auto-creates args table with discovered parameter names

Output Tables:

  • results_table: Full history of all requests (request_id, timestamp, method, url, status_code, response, duration)
  • last_response_table: Key-value pairs from most recent request

Default Example:

  • Pre-configured get_weather endpoint using free Open-Meteo API
  • Demonstrates {lat} and {lon} placeholder substitution
  • Works out of the box with no API key required

Python API:

```python

op('tool_request').Request(

url='https://api.example.com/data',

method='POST',

headers={'Authorization': 'Bearer token'},

body='{"key": "value"}',

callback=my_callback,

callback_args=('my_data',)

)

```

Parameters

Request Page:

  • Timeout, Execute, Status, Laststatuscode, Lastduration, Responsetype, Clearresults
  • Endpoint sequence block parameters

Test Page:

  • Executeblock: Select which endpoint to test
  • Analyzeschema: Infer parameters from templates
  • Argsdat: Reference to args table

Tool Page:

  • Enabletool: Master switch for agent exposure