Academy
⌘K
Getting Started
  • Platform Overview
  • AWS Marketplace Setup
  • Quickstart Guide
Connections
  • Overview
Workflow Builder
  • Overview
  • Nodes Catalog
Helix AI Assistant
  • Overview
Mapping Engine
  • Overview
Workflow Library
  • Overview
  • HL7
  • FHIR
  • Insurance
  • Agentic
  • Mapping
Security & Infrastructure
  • Architecture
  • HIPAA Compliance
  • Performance & Scalability
← Back to ConnectHealth
Get Started
Back to Nodes
AI Agent1 input → 2 outputs

AI Tool

payload (any)aiagent (object)aiagent.toolCall (object)AI AgentAI ToolOutput 1payload (any)aiagent.tools (array)Output 2toolInput (object)_toolContext.i… (string)_toolContext.a… (string)Data flowProperty

Defines a custom tool that the AI Agent can call, and coordinates between the AI and the tool's execution flow.

Inputs

payload any
Message from upstream node (typically AI Model or function node)
aiagent object
AI configuration passed through the flow
aiagent.toolCall object
When AI calls this tool: {name, arguments}

Outputs

  1. Output 1 - To Next Node (AI Agent)
    payload any
    Original payload passed through
    aiagent.tools array
    Updated tools array with this tool's definition added
  2. Output 2 - To Tool Flow (when AI calls tool)
    toolInput object
    Arguments provided by AI: {param1: value1, param2: value2}
    _toolContext object
    Internal tracking info:
    • identifier - Tool ID
    • adapterNodeId - Node ID for Tool Terminate
    • requestId - Unique request ID for concurrency
    • startTime - Execution start timestamp
    • timeout - Configured timeout in ms

Details

The Tool Adapter is the bridge between the AI Agent and custom tool implementations. It:

  1. Registers a tool definition with the AI (via output 1)
  2. When AI calls the tool, routes the request to your flow (output 2)
  3. Coordinates with Tool Terminate to return results to the AI

Tool Definition

Tool ID
Unique identifier (letters, numbers, underscores, hyphens). AI uses this to call the tool.
Description
Tell the AI what this tool does. Be specific—AI uses this to decide when to call it.
Parameters
Define what arguments the AI should provide:
  • name: Parameter identifier
  • type: string, number, boolean, object, array
  • description: Help AI understand what value to provide
  • required: Whether this parameter is mandatory

Tool Settings

Timeout
Max milliseconds to wait for tool execution. Default: 30000 (30 seconds)
Validation Code
JavaScript to validate tool input before execution:
if (!input.patientId) {
  return { valid: false, error: 'patientId required' };
}
return { valid: true };

Examples

FHIR Search Tool:

Tool ID: search_patient
Description: Search for patients by name or MRN
Parameters:
  - name: searchTerm (string, required)
    "The patient name or MRN to search for"

Appointment Booking Tool:

Tool ID: book_appointment
Description: Schedule an appointment for a patient
Parameters:
  - patientId (string, required)
  - dateTime (string, required)
  - providerId (string, required)
  - reason (string, optional)

Flow Pattern

[AI Model] → [Tool Adapter]
                ↓ output 1 → continues to AI Agent
                ↓ output 2 → [Your Tool Flow] → [Tool Terminate]

Best Practices

  • Write clear, specific tool descriptions
  • Mark only truly required parameters as required
  • Validate inputs to prevent errors downstream
  • Always end tool flows with Tool Terminate