Skip to content
  1. OPERATORS
  2. CONTROLLERS

Tool Request

v1.1.0new

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

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

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

Fresh placement starts with:

  • Mode: on
  • Name: get_weather
  • URL: https://api.open-meteo.com/v1/forecast?latitude={lat}&longitude={lon}&current=temperature_2m
  • HTTP Method: GET
  • Description: 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:

  • lat
  • lon

An agent can call it when the user asks for current weather by coordinates.

  1. On the Request page, add an endpoint to the ‘Endpoint’ sequence.
  2. Set ‘Mode’ to on to expose it, or off to keep it private.
  3. Set ‘Name’ to a descriptive function name. This becomes the tool name agents call.
  4. Enter the ‘URL’ with placeholders for dynamic values, e.g. https://api.example.com/search?q={query}.
  5. Set ‘HTTP Method’ to the appropriate method (GET, POST, PUT, or DELETE).
  6. Optionally set a ‘Headers DAT’ pointing to a table with key-value header pairs.
  7. For POST/PUT, set ‘bodytemplate’ with a JSON body using placeholders, e.g., {"query": "{search_term}"}.
  8. 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. Set each endpoint’s ‘Mode’ to ‘on’ when it should be exposed, or ‘off’ when it should stay private.
  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 ‘on’ or ‘off’.
  3. Each on endpoint becomes a separate tool for the agent.
  4. Off endpoints are skipped during tool registration.
  • 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.
  • 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.
Status (Status) op('tool_request').par.Status Str

Current request status

Default:
"" (Empty String)
Endpoint (Endpoint) op('tool_request').par.Endpoint Sequence
Default:
0
Mode (Endpoint0mode) op('tool_request').par.Endpoint0mode Menu
Default:
on
Options:
off, on
Name (Endpoint0name) op('tool_request').par.Endpoint0name Str
Default:
get_weather
URL (Endpoint0url) op('tool_request').par.Endpoint0url Str
Default:
https://api.open-meteo.com/v1/forecast?latitude={lat}&longitude={lon}&current=temperature_2m
HTTP Method (Endpoint0method) op('tool_request').par.Endpoint0method Menu
Default:
GET
Options:
GET, POST, PUT, DELETE
Headers DAT (Endpoint0headersdat) op('tool_request').par.Endpoint0headersdat DAT
Default:
"" (Empty String)
Body Template (Endpoint0bodytemplate) op('tool_request').par.Endpoint0bodytemplate Str
Default:
"" (Empty String)
Description (Endpoint0description) 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.
Execute Block (Executeblock) op('tool_request').par.Executeblock Int

Select which endpoint block to test

Default:
0
Range:
0 to 10
Execute (Execute) op('tool_request').par.Execute Pulse

Execute the selected endpoint with test args

Default:
False
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:
tool_request_args
Last Status Code (Laststatuscode) op('tool_request').par.Laststatuscode Int

HTTP status code from last request

Default:
0
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
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
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 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: on/off

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:

  • 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