Tool Editor
Visual interface for building tool actions
Tool Editor
The Tool Editor provides a visual interface for creating and configuring tools without writing JSON. Build action chains, configure webhooks, and set up conditional logic through an intuitive UI.
Accessing the Tool Editor
- Navigate to Tools in the dashboard sidebar
- Click New Tool or select an existing tool
- Use the tabbed interface to configure different aspects
Editor Sections
Basic Information
Configure the tool's identity:
- Name - Unique identifier (lowercase, underscores allowed)
- Description - What the tool does (shown to the LLM)
Parameters Tab
Define what information the LLM should extract from conversations.
Adding Parameters
- Click Add Parameter
- Configure the parameter:
- Name - Parameter identifier
- Type - Data type (string, number, boolean, array, object)
- Required - Toggle for mandatory parameters
- Description - Help text for the LLM
Parameter Types
| Type | Use Case | Example |
|---|---|---|
string | Text values | Names, descriptions |
number | Numeric values | Quantities, prices |
boolean | Yes/no values | Confirmations, flags |
array | Multiple items | List of dishes, tags |
object | Complex data | Nested structures |
Actions Tab
Build the action chain that executes when the tool is called.
Adding Actions
- Click Add Action
- Select the action type from the dropdown
- Configure type-specific properties
- Drag to reorder actions
Action Editor Features
Each action has:
- Expand/Collapse - Toggle to show/hide details
- Type Selector - Change the action type
- Configuration Fields - Type-specific inputs
- Delete Button - Remove the action
Action Types Reference
Context Actions
Set Context
Store a value in the call context:
| Field | Description |
|---|---|
| Key | Dot-notation path (e.g., user.preferences.theme) |
| Value | Expression referencing params or context |
Get Context
Retrieve a value from context:
| Field | Description |
|---|---|
| Key | Path to the value to retrieve |
Delete Context
Remove a value from context:
| Field | Description |
|---|---|
| Key | Path to the value to delete |
Flag Actions
Set Flag
Set a boolean flag:
| Field | Description |
|---|---|
| Flag Name | Flag identifier (e.g., skip_confirmation) |
Clear Flag
Clear a boolean flag:
| Field | Description |
|---|---|
| Flag Name | Flag to clear |
Communication Actions
Respond
Generate a speech response to the user:
| Field | Description |
|---|---|
| Message | Static text to speak |
| Message Key | OR context path for dynamic message |
Use {{variable}} syntax in messages for interpolation.
Handoff
Transfer the conversation to another agent:
| Field | Description |
|---|---|
| Target Agent | Agent identifier to transfer to |
| Handoff Message | Optional message during transfer |
Integration Actions
Webhook
Call an external API endpoint:
| Field | Description |
|---|---|
| Endpoint Name | Reference to tenant endpoint config |
| Payload Mapping | JSON mapping params to request body |
| Store Result As | Context key for the response |
Logic Actions
Conditional
Branch execution based on a condition:
| Field | Description |
|---|---|
| Condition | JavaScript-like expression |
| Then | Actions to run if true |
| Else | Actions to run if false |
Nested Actions: Both then and else support full action chains, including nested conditionals.
Validate
Validate parameter input:
| Field | Description |
|---|---|
| Field | Parameter to validate |
| Rule | Validation rule type |
| Error Message | Message if validation fails |
Rules: required, email, phone, number, min_length, max_length, pattern
Transform
Transform data using expressions:
| Field | Description |
|---|---|
| Input | Source data expression |
| Expression | Transformation logic |
| Output | Context key for result |
Log
Log data for debugging:
| Field | Description |
|---|---|
| Level | debug, info, warn, error |
| Message | Log message |
| Data Expression | Optional data to include |
Building Conditional Logic
The conditional action editor provides a visual interface for branching logic.
Creating a Conditional
- Add a Conditional action
- Enter the condition expression
- Expand the Then section
- Add actions to run when true
- Expand the Else section
- Add actions to run when false
Condition Expressions
Conditions use JavaScript-like syntax:
// Simple comparisons
context.user_type === 'premium'
params.amount > 100
flags.verified === true
// Logical operators
params.age >= 18 && context.country === 'US'
flags.vip || params.priority === 'high'
// Existence checks
context.user.email !== undefined
params.optional_fieldNested Conditionals
Conditionals can be nested for complex logic:
If user is premium
Then: If order > $100
Then: Apply 20% discount
Else: Apply 10% discount
Else: Show upgrade promptBuild this by adding a conditional inside another conditional's then or else branch.
Success/Failure Callbacks Tab
Configure actions that run after the main action chain.
On Success
Actions executed when the tool completes successfully:
- Click Add in the On Success section
- Add notification, logging, or cleanup actions
- Common patterns:
- Log success metrics
- Update user state
- Send confirmation response
On Failure
Actions executed when the tool encounters an error:
- Click Add in the On Failure section
- Add error handling actions
- Common patterns:
- Log error details
- Notify user of failure
- Trigger fallback behavior
Common Patterns
Data Collection Tool
1. Validate: Check required fields
2. Context Set: Store user input
3. Respond: Confirm receiptAPI Integration Tool
1. Validate: Verify parameters
2. Webhook: Call external API
3. Conditional: Check response
Then: Respond with success
Else: Respond with errorMulti-Step Tool
1. Context Get: Retrieve existing data
2. Transform: Merge with new input
3. Context Set: Update state
4. Webhook: Sync with backend
5. Flag Set: Mark as complete
6. Respond: Confirm to userConditional Response Tool
1. Conditional: Check user tier
Then:
- Context Set: Apply premium pricing
- Respond: "Here's your VIP discount"
Else:
- Context Set: Apply standard pricing
- Respond: "Here's your price"Best Practices
Action Design
- Validate early - Check inputs before processing
- Fail gracefully - Always have error responses
- Log strategically - Add logs for debugging without noise
- Keep chains short - Complex logic belongs in conditionals
Performance
- Minimize webhooks - Each call adds latency
- Cache when possible - Store frequently-used data in context
- Exit early - Use conditionals to skip unnecessary actions
Debugging
- Use log actions - Add temporary logs during development
- Check call transcripts - Review tool execution in monitoring
- Test incrementally - Verify each action works before adding more