Tool Request
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.
Agent Tool Integration
Section titled “Agent Tool Integration”This operator exposes 1 tool that allow Agent and Gemini Live LOPs to make HTTP requests to configured API endpoints with dynamic parameter substitution.
Use the Tool Debugger operator to inspect exact tool definitions, schemas, and parameters.
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).
Input/Output
Section titled “Input/Output”Inputs
Section titled “Inputs”None - endpoints are configured via the parameter panel.
Outputs
Section titled “Outputs”- 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
Usage Examples
Section titled “Usage Examples”Configuring an Endpoint
Section titled “Configuring an Endpoint”- On the Request page, add an endpoint to the ‘Endpoint’ sequence.
- Set ‘Name’ to a descriptive identifier (this becomes the tool name for agents).
- Enter the ‘url’ with placeholders for dynamic values, e.g.,
https://api.weather.com/v1/forecast?city={city}. - Set ‘HTTP Method’ to the appropriate method (GET, POST, PUT, or DELETE).
- Optionally set a ‘Headers DAT’ pointing to a table with key-value header pairs.
- For POST/PUT, set ‘bodytemplate’ with a JSON body using placeholders, e.g.,
{"query": "{search_term}"}. - Add a ‘Description’ so agents understand what this endpoint does.
Testing an Endpoint
Section titled “Testing an Endpoint”- On the Test page, set ‘Execute Block’ to the index of the endpoint you want to test.
- Pulse ‘Analyze Schema’ to auto-detect parameters from your URL and body templates.
- An args table will be created (or referenced from ‘Args Table’) with the detected parameter names.
- Fill in test values in the args table.
- Pulse ‘Execute Request’ to make the request.
- Check the results in the
last_response_tableDAT and the status parameters.
Giving Agents API Access
Section titled “Giving Agents API Access”- Configure one or more endpoints as described above.
- On the Tool page, toggle ‘Enable Tool’ to On.
- Connect this operator to an Agent LOP’s tool inputs (or wire through a Tool Manager).
- The agent can now call each enabled endpoint by name, passing the required parameters.
Multiple Endpoints
Section titled “Multiple Endpoints”- Add multiple blocks to the ‘Endpoint’ sequence for different API calls.
- Set each endpoint’s ‘Mode’ to ‘enabled’, ‘disabled’, or ‘forced’.
- Each enabled endpoint becomes a separate tool for the agent.
- Disabled endpoints are skipped during tool registration.
Best Practices
Section titled “Best Practices”- 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.
Troubleshooting
Section titled “Troubleshooting”- 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.
Parameters
Section titled “Parameters”Request
Section titled “Request”op('tool_request').par.Timeout Int Request timeout in seconds
- Default:
0- Range:
- 1 to 300
- Slider Range:
- 1 to 300
op('tool_request').par.Execute Pulse Execute the HTTP request
- Default:
False
op('tool_request').par.Status Str Current request status
- Default:
"" (Empty String)
op('tool_request').par.Laststatuscode Int HTTP status code from last request
- Default:
0- Range:
- 0 to 1
- Slider Range:
- 0 to 1
op('tool_request').par.Lastduration Float Duration of last request in seconds
- Default:
0.0- Range:
- 0 to 1
- Slider Range:
- 0 to 1
op('tool_request').par.Responsetype Str Content type of last response
- Default:
"" (Empty String)
op('tool_request').par.Clearresults Pulse Clear all request history
- Default:
False
op('tool_request').par.Endpoint Sequence - Default:
0
op('tool_request').par.Endpoint0name Str - Default:
"" (Empty String)
op('tool_request').par.Endpoint0url Str - Default:
"" (Empty String)
op('tool_request').par.Endpoint0headersdat DAT Table DAT with header key-value pairs
- Default:
"" (Empty String)
op('tool_request').par.Endpoint0bodytemplate Str - Default:
"" (Empty String)
op('tool_request').par.Endpoint0description Str - Default:
"" (Empty String)
op('tool_request').par.Executeblock Int Select which endpoint block to test
- Default:
0- Range:
- 0 to 10
- Slider Range:
- 0 to 10
op('tool_request').par.Analyzeschema Pulse Infer parameters and generate test args table
- Default:
False
op('tool_request').par.Argsdat DAT Table DAT with parameter names and values (auto-created if empty)
- Default:
"" (Empty String)
op('tool_request').par.Enabletool Toggle Master switch to expose endpoints to agent
- Default:
False
Changelog
Section titled “Changelog”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 exposureEndpoint{i}url: URL template with{placeholder}substitutionEndpoint{i}method: HTTP method (GET/POST/PUT/DELETE)Endpoint{i}description: Tool description for agentsEndpoint{i}headersdat: Optional headers table DAT referenceEndpoint{i}bodytemplate: Request body with{placeholder}substitutionEndpoint{i}mode: enabled/disabled
Schema Analysis:
Analyzeschemapulse 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_weatherendpoint 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