AI Agent1 input → 2 outputs
AI HTTP Tool
Creates an HTTP request tool that the AI Agent can call to make external API calls with dynamic parameters.
Inputs
Outputs
- Output 1 - To Next Node
- Output 2
Not used during initial message pass. HTTP request executes inline when AI calls the tool.
When AI tool executes: Returns object with {status, headers, data}
Details
HTTP tools let the AI make external API calls. The AI provides input parameters that get substituted into your URL, headers, and body.
Configuration
- Tool Name
- Unique identifier for this tool
- Description
- Tell the AI when/how to use this HTTP endpoint
- Method
- HTTP method: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
- URL
- Endpoint URL. Can include template variables.
- Headers (JSON)
- HTTP headers as JSON object. Can include template variables.
- Body
- Request body for POST/PUT/PATCH. Can include template variables.
Template Variables
Use ${input.propertyName} syntax to insert values from AI input:
URL: https://api.fhir.org/Patient/${input.patientId}
Headers: {
"Authorization": "Bearer ${input.token}"
}
Body: {
"name": "${input.patientName}",
"dob": "${input.dateOfBirth}"
}
Examples
FHIR Patient Lookup:
Tool Name: get_patient
Method: GET
URL: https://fhir.example.com/Patient/${input.patientId}
Headers: {"Accept": "application/fhir+json"}
Weather API:
Tool Name: get_weather
Method: GET
URL: https://api.weather.com/v1/current?city=${input.city}
Headers: {"API-Key": "your-key"}
Best Practices
- Use descriptive tool names and descriptions
- Validate inputs before making HTTP calls
- Handle errors from API (check error output)
- Keep API keys secure (use environment variables)