AI Chatbot with Tool Calling
Chatbot workflow that can use MCP tools like getting current time
Workflow Information
ID: chatbot_with_tools_test_v2
Namespace: default
Version: 1
Created: 2025-07-21
Updated: 2025-07-21
Tasks: 1
Quick Actions
Inputs
| Name | Type | Required | Default |
|---|---|---|---|
user_message |
string | Required |
What time is it?
|
session_id |
string | Optional | None |
Outputs
| Name | Type | Source |
|---|---|---|
ai_response |
string | chatbot_with_tools_task |
session_id |
string | chatbot_with_tools_task |
conversation_length |
number | chatbot_with_tools_task |
Tasks
chatbot_with_tools_task
chatbotGenerate AI response using tools when needed
Task Inputs: session_id, user_message
YAML Source
id: chatbot_with_tools_test_v2
name: AI Chatbot with Tool Calling
tasks:
- id: chatbot_with_tools_task
name: Chatbot with Tool Calling
type: chatbot
config:
user_id: anonymous
ai_config:
tools:
- current_time
- relative_time
- days_in_month
streaming: true
max_tokens: 1000
temperature: 0.7
system_prompt: 'You are a helpful AI assistant with access to various time-related
tools.
When users ask about time, dates, or time-related questions, use the appropriate
tools:
- current_time: Get current date and time
- relative_time: Get relative time from now
- days_in_month: Get number of days in a month
- convert_time: Convert time between timezones
Use the tool_executor function with:
- deployment_id: "pod-smqpgmrz" (the time server)
- tool_name: one of the available tools
- arguments: JSON string with tool parameters
Always explain what you''re doing when using tools.
'
model_client_id: openai_gpt4_mini
tenant_id: 0572fa8d-d7c3-47db-9219-ef40b80d42b7
workflow_id: chatbot_with_tools_test_v2
inputs:
session_id: ${session_id}
user_message: ${user_message}
description: Generate AI response using tools when needed
inputs:
- name: user_message
type: string
default: What time is it?
required: true
description: User's message to the chatbot
- name: session_id
type: string
default: ''
required: false
description: Chat session ID (optional for new sessions)
labels:
- chat
- chatbot
- tools
- mcp
- time
outputs:
- name: ai_response
type: string
source: chatbot_with_tools_task
description: AI assistant's response using tools when needed
- name: session_id
type: string
source: chatbot_with_tools_task
description: Chat session ID for conversation tracking
- name: conversation_length
type: number
source: chatbot_with_tools_task
description: Number of messages in the conversation
version: 1
tenant_id: 0572fa8d-d7c3-47db-9219-ef40b80d42b7
description: Chatbot workflow that can use MCP tools like getting current time
model_clients:
- id: openai_gpt4_mini
config:
model: gpt-4o-mini
api_key: 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
max_tokens: 800
temperature: 0.3
provider: openai
| Execution ID | Status | Started | Duration | Actions |
|---|---|---|---|---|
4f158594...
|
COMPLETED |
2025-08-06
06:08:19 |
N/A | View |
8b2f77d4...
|
COMPLETED |
2025-07-30
10:17:29 |
N/A | View |
bea04717...
|
COMPLETED |
2025-07-30
10:13:43 |
N/A | View |
0688ac95...
|
COMPLETED |
2025-07-24
11:18:35 |
N/A | View |
77985c30...
|
COMPLETED |
2025-07-24
11:18:04 |
N/A | View |
ff746a8a...
|
COMPLETED |
2025-07-24
11:17:32 |
N/A | View |
080e0f52...
|
COMPLETED |
2025-07-22
07:27:08 |
N/A | View |
9b9230ac...
|
COMPLETED |
2025-07-21
19:20:28 |
N/A | View |
5ad0ba98...
|
COMPLETED |
2025-07-21
18:41:31 |
N/A | View |