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 → 0 outputs

Tool Terminate

payload (any)_toolContext (object)AI AgentTool TerminateData flowProperty

Marks the end of a tool execution flow and returns the result back to the AI Agent.

Inputs

payload any
The result of your tool execution. This becomes the tool's return value to the AI.
_toolContext object
Internal tracking from Tool Adapter (automatically passed through). Contains adapterNodeId and requestId.

Outputs

This node has no outputs—it signals completion back to the Tool Adapter internally.

Details

Every tool flow started by a Tool Adapter must end with a Tool Terminate node. This node:

  1. Captures the final msg.payload as the tool result
  2. Signals completion to the originating Tool Adapter
  3. Returns the result to the AI Agent for processing

Return Values

The AI receives whatever is in msg.payload:

  • String: AI sees as text response
  • Object: AI can parse structured data
  • Array: AI can iterate over results

Flow Pattern

[Tool Adapter output 2] → [Your Logic] → [Tool Terminate]

Examples

Simple Result:

msg.payload = "Patient found: John Smith, DOB: 1985-03-15";
return msg;  // Goes to Tool Terminate

Structured Result:

msg.payload = {
  found: true,
  patient: { name: "John Smith", mrn: "12345" },
  count: 1
};
return msg;

Best Practices

  • Always end tool flows with Tool Terminate
  • Return meaningful data in msg.payload
  • Include error information if the tool failed
  • Keep responses concise—AI has context limits