選用範例檢查
Section titled “選用範例檢查”-
預覽 JSONPath 比對結果。對提供的 JSON 檢查根節點、欄位、陣列索引與萬用字元路徑。不會執行 Action 或儲存對話記憶。
-
檢查範例 MCP 連線。僅會在 Cloudflare 文件或 Microsoft Learn 端點初始化並列出工具。不會登入或執行工具。
相容瀏覽器也能將這些檢查作為網站工具使用。連結會開啟一般表單。
AI Actions
Section titled “AI Actions”AI Actions 將 AI Agent 的能力擴展至知識庫問答之外。您可以定義觸發行為,也就是 AI 在對話中偵測到特定情況時應執行的工作。
AI Actions 的用途:
- HTTP 請求 Actions:觸發時呼叫外部 API,例如在對話中查詢後端訂單狀態、建立支援工單或查詢帳戶資訊。
- MCP Actions:連接 Model Context Protocol 伺服器,進行進階工具整合,例如 Shopify 商品查詢與自訂資料庫查詢。
常見用途:
- 在對話中從後端系統查詢即時資訊,例如訂單狀態、帳戶資料與庫存
- 根據對話脈絡建立工單、更新 CRM 紀錄,或觸發外部系統的工作流程
- 查詢產品目錄,提供個人化推薦
每個 Action 都有 name、description(對 HTTP 請求 Actions 而言,說明會告訴 AI 何時觸發)及類型專屬設定。可透過 API 個別啟用或停用。Actions 在 Quickchat 控制台建立與完整設定;API 提供列出、更新(啟用/停用)與刪除操作,另有專用端點建立與設定 MCP Actions。
列出所有 AI Actions
Section titled “列出所有 AI Actions”GET https://app.quickchat.ai/v1/api/ai_actions
curl https://app.quickchat.ai/v1/api/ai_actions \ -H 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.get( url="https://app.quickchat.ai/v1/api/ai_actions", headers={"Authorization": "Bearer <API_TOKEN>"},)data = response.json()回應 200 OK
[ { "id": 1, "name": "Check Order Status", "description": "Look up order status when customer asks about their order.", "is_active": true, "type": "http_request", "icon": null, "icon_color": null, "is_valid": true }]| 欄位 | 說明 |
|---|---|
id 整數 | AI Action 識別碼 |
name 字串 | 顯示名稱 |
description 字串 | Action 觸發時機 |
is_active 布林值 | 是否啟用 |
type 字串 | "http_request"、"remote_mcp"、"shopify_remote_mcp" 或 "knowledge_base" |
icon 字串或 null | 圖示識別碼 |
icon_color 字串或 null | 圖示顏色 |
is_valid 布林值 | 是否正確設定 |
更新 AI Action
Section titled “更新 AI Action”PATCH https://app.quickchat.ai/v1/api/ai_actions/{action_id}
請求本文
| 參數 | 說明 |
|---|---|
is_active 布林值 | 啟用/停用 Action |
icon 字串 | 圖示識別碼(最多 200 個字元) |
icon_color 字串 | 圖示顏色(最多 50 個字元) |
curl -X PATCH https://app.quickchat.ai/v1/api/ai_actions/1 \ -H 'Authorization: Bearer <API_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{"is_active": false}'import requests
response = requests.patch( url="https://app.quickchat.ai/v1/api/ai_actions/1", headers={"Authorization": "Bearer <API_TOKEN>"}, json={"is_active": False},)data = response.json()回應 200 OK:傳回更新後的 AI Action 快照。
刪除 AI Action
Section titled “刪除 AI Action”DELETE https://app.quickchat.ai/v1/api/ai_actions/{action_id}
curl -X DELETE https://app.quickchat.ai/v1/api/ai_actions/1 \ -H 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.delete( url="https://app.quickchat.ai/v1/api/ai_actions/1", headers={"Authorization": "Bearer <API_TOKEN>"},)回應 200 OK(空本文)
建立 MCP Action
Section titled “建立 MCP Action”POST https://app.quickchat.ai/v1/api/ai_actions/remote_mcp
將遠端 MCP 伺服器以 MCP Action 連接至 AI Agent。需要具有 write_all 權限範圍的 API Token;API Token 需要 Business 方案或更高等級。
請求本文
| 參數 | 說明 |
|---|---|
remote_mcp_url 字串,必填 | MCP 伺服器 URL。必須使用 https://;解析為私人或內部網路位址的 URL 會被拒絕 |
headers 陣列,必填 | 傳送至伺服器的連線標頭,例如靜態 Authorization Token。每項為 {"id", "name", "value"},id 可使用任意唯一字串。伺服器不需標頭時傳送 [] |
allowed_tools 陣列,必填 | 各工具開關,每項為 {"name", "is_active"}。傳送 [] 可讓工具可用性由 default_tool_is_active 決定 |
name 字串 | Actions 清單中的顯示名稱(最多 100 個字元)。預設為從伺服器主機名稱推導的標籤 |
description 字串 | Actions 清單中顯示的說明(最多 2500 個字元) |
icon 字串 | 圖示識別碼(最多 200 個字元) |
icon_color 字串 | 圖示顏色(最多 50 個字元) |
name 與 description 是給操作人員看的標籤,用來在控制台辨識 Action,AI 不會讀取。AI 使用的是 MCP 伺服器本身發布的工具說明。
curl -X POST https://app.quickchat.ai/v1/api/ai_actions/remote_mcp \ -H 'Authorization: Bearer <API_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "remote_mcp_url": "https://mcp.example.com/mcp", "headers": [ {"id": "h-1", "name": "Authorization", "value": "Bearer <SERVER_TOKEN>"} ], "allowed_tools": [], "name": "Example MCP" }'import requests
response = requests.post( url="https://app.quickchat.ai/v1/api/ai_actions/remote_mcp", headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "remote_mcp_url": "https://mcp.example.com/mcp", "headers": [ {"id": "h-1", "name": "Authorization", "value": "Bearer <SERVER_TOKEN>"} ], "allowed_tools": [], "name": "Example MCP", },)data = response.json()回應 201 Created
{ "id": 2, "name": "Example MCP", "description": "Connected MCP server", "is_active": false, "type": "remote_mcp", "icon": "FaMixcloud", "icon_color": "#EF4444", "is_valid": true, "validation_issues": [], "remote_mcp_url": "https://mcp.example.com/mcp", "remote_mcp_auth_token": "", "default_tool_is_active": true, "allowed_tools": [], "headers": [ {"id": 10, "name": "Authorization", "value": "Bearer <SERVER_TOKEN>"} ], "oauth": null, "recommended_tools": []}| 欄位 | 說明 |
|---|---|
remote_mcp_url 字串 | 已連接的 MCP 伺服器 URL |
default_tool_is_active 布林值 | 是否允許使用未列在 allowed_tools 的工具 |
allowed_tools 陣列 | 各工具開關,{"name", "is_active"} |
headers 陣列 | 儲存的連線標頭 |
remote_mcp_auth_token 字串或 null | 舊版靜態 Token 欄位。無法透過此 API 設定,請改以 headers 傳入憑證 |
oauth 物件或 null | 透過 OAuth 登入連接之伺服器的授權狀態,其他情況為 null |
recommended_tools 陣列 | 具備精選設定檔的伺服器中,Quickchat 建議的工具名稱(唯讀) |
validation_issues 陣列 | 未通過的設定檢查名稱;is_valid 為 true 時為空 |
其他欄位與列出所有 AI Actions相同。
Action 建立時設為 is_active: false。對沒有 Quickchat 精選設定檔的伺服器,初始也會設為 default_tool_is_active: true,因此在限制之前,回覆時發現的每個工具都可使用。若要開啟 Action,請使用上方的更新 AI Action端點:PATCH /v1/api/ai_actions/{action_id},搭配 {"is_active": true}。
取得 MCP Action 設定
Section titled “取得 MCP Action 設定”GET https://app.quickchat.ai/v1/api/ai_actions/{action_id}/remote_mcp
curl https://app.quickchat.ai/v1/api/ai_actions/2/remote_mcp \ -H 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.get( url="https://app.quickchat.ai/v1/api/ai_actions/2/remote_mcp", headers={"Authorization": "Bearer <API_TOKEN>"},)data = response.json()回應 200 OK:傳回 MCP 專屬設定,結構與上方建立回應相同。
更新 MCP Action 設定
Section titled “更新 MCP Action 設定”PATCH https://app.quickchat.ai/v1/api/ai_actions/{action_id}/remote_mcp
所有欄位皆為選填,只有傳送的欄位會變更。
請求本文
| 參數 | 說明 |
|---|---|
remote_mcp_url 字串 | 新伺服器 URL,採用與建立時相同的驗證。修改已透過 OAuth 連接之伺服器的 URL,會清除儲存的授權並關閉 Action |
headers 陣列 | 取代連線標頭 |
allowed_tools 陣列 | 取代各工具開關,每項為 {"name", "is_active"} |
default_tool_is_active 布林值 | 是否允許使用未列在 allowed_tools 的工具 |
name 字串 | 顯示名稱(最多 100 個字元) |
description 字串 | Actions 清單中顯示的說明(最多 2500 個字元) |
curl -X PATCH https://app.quickchat.ai/v1/api/ai_actions/2/remote_mcp \ -H 'Authorization: Bearer <API_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "allowed_tools": [ {"name": "search_docs", "is_active": true}, {"name": "delete_page", "is_active": false} ], "default_tool_is_active": false }'import requests
response = requests.patch( url="https://app.quickchat.ai/v1/api/ai_actions/2/remote_mcp", headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "allowed_tools": [ {"name": "search_docs", "is_active": True}, {"name": "delete_page", "is_active": False}, ], "default_tool_is_active": False, },)data = response.json()回應 200 OK:傳回更新後的 MCP Action,結構與建立回應相同。
公開 API 不提供連線測試與工具探索,也就是控制台的連接檢查。連接或重新連接伺服器時,控制台會自動執行檢查;使用 OAuth 保護的伺服器必須在控制台完成授權。上述回應的 oauth 欄位會回報該狀態。