- OPERATORS
- CONTROLLERS
Tool Request
v1.1.0newThe Tool Request LOP turns HTTP endpoints into agent-callable tools. It is the LOPs version of the classic weather tool-calling example: a user fills in a URL template, names the endpoint, describes what it does, and GetTool() exposes that endpoint as a function the model can call.
By default, a new Tool Request is configured as a weather lookup using Open-Meteo. The exposed tool is get_weather, and the model fills lat and lon from the schema inferred from the URL.
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 endpoint block in the Request page can become one tool. The operator automatically infers parameter schemas from URL and body template placeholders. For example, {city} in a URL becomes a required city parameter in the model-facing tool schema.
The top of the Request page shows the current request status. Test execution controls and response details live on the Test page.
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
Default Weather Tool
Section titled “Default Weather Tool”Fresh placement starts with:
Mode:onName:get_weatherURL:https://api.open-meteo.com/v1/forecast?latitude={lat}&longitude={lon}¤t=temperature_2mHTTP Method:GETDescription:Get the current air temperature from Open-Meteo for a latitude/longitude pair. Use lat and lon as decimal degrees.
That produces one tool definition named get_weather with required string parameters:
latlon
An agent can call it when the user asks for current weather by coordinates.
Endpoint Setup
Section titled “Endpoint Setup”Configure An Endpoint
Section titled “Configure An Endpoint”- On the Request page, add an endpoint to the ‘Endpoint’ sequence.
- Set ‘Mode’ to
onto expose it, oroffto keep it private. - Set ‘Name’ to a descriptive function name. This becomes the tool name agents call.
- Enter the ‘URL’ with placeholders for dynamic values, e.g.
https://api.example.com/search?q={query}. - 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.
Test An Endpoint
Section titled “Test 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.
Give Agents API Access
Section titled “Give Agents API Access”- Configure one or more endpoints as described above.
- Set each endpoint’s ‘Mode’ to ‘on’ when it should be exposed, or ‘off’ when it should stay private.
- 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 ‘on’ or ‘off’.
- Each
onendpoint becomes a separate tool for the agent. - Off 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.
- 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.
- Request does not return - Check that the target API is reachable from your network.
Parameters
Section titled “Parameters”Request
Section titled “Request”op('tool_request').par.Status Str Current request status
- Default:
"" (Empty String)
op('tool_request').par.Endpoint Sequence - Default:
0
op('tool_request').par.Endpoint0name Str - Default:
get_weather
op('tool_request').par.Endpoint0url Str - Default:
https://api.open-meteo.com/v1/forecast?latitude={lat}&longitude={lon}¤t=temperature_2m
op('tool_request').par.Endpoint0headersdat DAT - Default:
"" (Empty String)
op('tool_request').par.Endpoint0bodytemplate Str - Default:
"" (Empty String)
op('tool_request').par.Endpoint0description Str - Default:
Get the current air temperature from Open-Meteo for a latitude/longitude pair. Use lat and lon as decimal degrees.
op('tool_request').par.Executeblock Int Select which endpoint block to test
- Default:
0- Range:
- 0 to 10
op('tool_request').par.Execute Pulse Execute the selected endpoint with test args
- Default:
False
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:
tool_request_args
op('tool_request').par.Laststatuscode Int HTTP status code from last request
- Default:
0- Range:
- 0 to 1
op('tool_request').par.Lastduration Float Duration of last request in seconds
- Default:
0.0- 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
Changelog
Section titled “Changelog”v1.1.02026-05-02
- added Toolname/Tooldescription pars for per-endpoint tool identity - added endpoint-aware tool description generation - simplified op_metadata.json endpoint defaults - updated guide.md with endpoint configuration docs - updated changelog formatting - updated category to Controllers
- added docs
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: on/off
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:
- Endpoint sequence block parameters
Test Page:
- Executeblock: Select which endpoint to test
- Execute: Execute the selected endpoint with test args
- Analyzeschema: Infer parameters from templates
- Argsdat: Reference to args table
- Status, Laststatuscode, Lastduration, Responsetype, Clearresults
- Endpoint mode controls agent exposure per configured endpoint