For the complete documentation index, see llms.txt. This page is also available as Markdown.

工具與連接器

建立工具

POST /api/v1/tools/

請求內容

請求參數

欄位
類型
必填
說明

name

string

工具名稱只能包含英文字母、數字、底線(_)和連字符(-)。MCP 類型工具不需要此欄位,此欄位將用於 API 類型工具給 LLM 使用。

displayName

string

可包含任何字符的名稱,供使用者設定使用和管理。

description

string

給用戶展示的工具描述。MCP 類型工具不需要此欄位。

prompt

string

給 LLM 使用的工具描述/提示詞。若為空,系統將使用 description 欄位。MCP 類型工具不需要此欄位。

toolType

object

apiUrl

string (uri)

httpMethod

object

rawHeaders

object

rawParametersSchema

object

functionCode

string

mcpUrl

string

mcpAllowedTools

object

rawMcpHeader

object

當 Contact 沒有對應的 MCP Credential 時,將使用此預設標頭

flexTemplateJson

object

FlexMessage JSON template. Required for FLEX_MESSAGE tools. Stores the full LINE FlexMessage JSON structure (bubble / carousel / box / text / image / button etc.).

flexSchema

object

AI dynamic field schema for FlexMessage. JSON object whose keys are field paths parsed from flex_template_json (e.g. text / image url / button label / button uri / button message). Each value may be e...

quickReplyConfig

object

Authoring config for QUICK_REPLY tools. Structured JSON describing the chip buttons: static list or dynamic (LLM-generated) mode, each field either a fixed value or an LLM prompt.

groups

array[IdName]

Groups this tool is assigned to. Non-owner members must pick at least one group they belong to.

請求結構範例

請求範例值

程式碼範例

回應內容

狀態碼: 201

回應結構範例

回應範例值


列出工具

GET /api/v1/tools/

參數

參數名稱
必填
類型
說明

clientPlatform

string

呼叫端平台。傳入 "desktop" 時會包含 desktop 類型工具,其餘值或未傳入則預設排除 desktop 工具

isGlobal

boolean

設定為 "true" 以獲取全域工具,否則獲取組織工具

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

toolType

string

過濾工具類型:api, function, mcp, desktop

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得特定工具

GET /api/v1/tools/{id}/

參數

參數名稱
必填
類型
說明

id

string

A UUID string identifying this 工具.

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


更新工具

PUT /api/v1/tools/{id}/

參數

參數名稱
必填
類型
說明

id

string

A UUID string identifying this 工具.

請求內容

請求參數

欄位
類型
必填
說明

name

string

工具名稱只能包含英文字母、數字、底線(_)和連字符(-)。MCP 類型工具不需要此欄位,此欄位將用於 API 類型工具給 LLM 使用。

displayName

string

可包含任何字符的名稱,供使用者設定使用和管理。

description

string

給用戶展示的工具描述。MCP 類型工具不需要此欄位。

prompt

string

給 LLM 使用的工具描述/提示詞。若為空,系統將使用 description 欄位。MCP 類型工具不需要此欄位。

toolType

object

apiUrl

string (uri)

httpMethod

object

rawHeaders

object

rawParametersSchema

object

functionCode

string

mcpUrl

string

mcpAllowedTools

object

rawMcpHeader

object

當 Contact 沒有對應的 MCP Credential 時,將使用此預設標頭

flexTemplateJson

object

FlexMessage JSON template. Required for FLEX_MESSAGE tools. Stores the full LINE FlexMessage JSON structure (bubble / carousel / box / text / image / button etc.).

flexSchema

object

AI dynamic field schema for FlexMessage. JSON object whose keys are field paths parsed from flex_template_json (e.g. text / image url / button label / button uri / button message). Each value may be e...

quickReplyConfig

object

Authoring config for QUICK_REPLY tools. Structured JSON describing the chip buttons: static list or dynamic (LLM-generated) mode, each field either a fixed value or an LLM prompt.

groups

array[IdName]

Groups this tool is assigned to. Non-owner members must pick at least one group they belong to.

請求結構範例

請求範例值

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


部分更新工具

PATCH /api/v1/tools/{id}/

參數

參數名稱
必填
類型
說明

id

string

A UUID string identifying this 工具.

請求內容

請求參數

欄位
類型
必填
說明

name

string

工具名稱只能包含英文字母、數字、底線(_)和連字符(-)。MCP 類型工具不需要此欄位,此欄位將用於 API 類型工具給 LLM 使用。

displayName

string

可包含任何字符的名稱,供使用者設定使用和管理。

description

string

給用戶展示的工具描述。MCP 類型工具不需要此欄位。

prompt

string

給 LLM 使用的工具描述/提示詞。若為空,系統將使用 description 欄位。MCP 類型工具不需要此欄位。

toolType

object

apiUrl

string (uri)

httpMethod

object

rawHeaders

object

rawParametersSchema

object

functionCode

string

mcpUrl

string

mcpAllowedTools

object

rawMcpHeader

object

當 Contact 沒有對應的 MCP Credential 時,將使用此預設標頭

flexTemplateJson

object

FlexMessage JSON template. Required for FLEX_MESSAGE tools. Stores the full LINE FlexMessage JSON structure (bubble / carousel / box / text / image / button etc.).

flexSchema

object

AI dynamic field schema for FlexMessage. JSON object whose keys are field paths parsed from flex_template_json (e.g. text / image url / button label / button uri / button message). Each value may be e...

quickReplyConfig

object

Authoring config for QUICK_REPLY tools. Structured JSON describing the chip buttons: static list or dynamic (LLM-generated) mode, each field either a fixed value or an LLM prompt.

groups

array[IdName]

Groups this tool is assigned to. Non-owner members must pick at least one group they belong to.

請求結構範例

請求範例值

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


刪除工具

DELETE /api/v1/tools/{id}/

參數

參數名稱
必填
類型
說明

id

string

A UUID string identifying this 工具.

程式碼範例

回應內容

狀態碼
說明

204

No response body


列出可用工具

GET /api/v1/tools/available-tools/

參數

參數名稱
必填
類型
說明

availableTools

array

所有可用的MCP工具列表

mcpAllowedTools

array

MCP 允許使用的工具列表

mcpUrl

string

MCP 伺服器 URL(必填)

rawMcpHeader

MCP Header(JSON 格式)

toolId

string

Tool ID for per-member OAuth token lookup

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值

狀態碼: 400

回應結構範例

回應範例值


建立連接器

POST /api/v1/connectors/

請求內容

請求參數

欄位
類型
必填
說明

mcpRegistryId

string (uuid)

displayName

string

Custom display name for this connector (defaults to MCP Registry name)

description

string

Custom description for this connector (defaults to MCP Registry description)

authHeaders

object

Authentication headers for Service Account MCP servers (auth_type=service_account).

isEnabled

boolean

Whether this connector is enabled for contacts in the organization

請求結構範例

請求範例值

程式碼範例

回應內容

狀態碼: 201

回應結構範例

回應範例值


列出連接器

GET /api/v1/connectors/

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得特定連接器

GET /api/v1/connectors/{id}/

參數

參數名稱
必填
類型
說明

id

string

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


更新連接器

PUT /api/v1/connectors/{id}/

參數

參數名稱
必填
類型
說明

id

string

請求內容

請求參數

欄位
類型
必填
說明

mcpRegistryId

string (uuid)

displayName

string

Custom display name for this connector (defaults to MCP Registry name)

description

string

Custom description for this connector (defaults to MCP Registry description)

authHeaders

object

Authentication headers for Service Account MCP servers (auth_type=service_account).

isEnabled

boolean

Whether this connector is enabled for contacts in the organization

請求結構範例

請求範例值

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


部分更新連接器

PATCH /api/v1/connectors/{id}/

參數

參數名稱
必填
類型
說明

id

string

請求內容

請求參數

欄位
類型
必填
說明

mcpRegistryId

string (uuid)

displayName

string

Custom display name for this connector (defaults to MCP Registry name)

description

string

Custom description for this connector (defaults to MCP Registry description)

authHeaders

object

Authentication headers for Service Account MCP servers (auth_type=service_account).

isEnabled

boolean

Whether this connector is enabled for contacts in the organization

請求結構範例

請求範例值

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


刪除連接器

DELETE /api/v1/connectors/{id}/

參數

參數名稱
必填
類型
說明

id

string

程式碼範例

回應內容

狀態碼
說明

204

No response body


列出連接器授權成員

GET /api/v1/connectors/{id}/authorized-members/

參數

參數名稱
必填
類型
說明

id

string

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


移除連接器授權成員

DELETE /api/v1/connectors/{id}/authorized-members/{memberId}/

參數

參數名稱
必填
類型
說明

id

string

memberId

string

程式碼範例

回應內容

狀態碼
說明

204

No response body


列出 MCP 工具登錄

GET /api/v1/mcp/registry/

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得特定 MCP 工具登錄

GET /api/v1/mcp/registry/{id}/

參數

參數名稱
必填
類型
說明

id

string

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得工具執行紀錄列表

GET /api/v1/tool-execution-records/

參數

參數名稱
必填
類型
說明

chatbot

string

通過 AI 助理 ID 過濾

endDate

string

結束日期(包含當日),格式:YYYY-MM-DD

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

query

string

搜尋 AI 助理名稱、工具名稱、訊息內容

startDate

string

開始日期(包含當日),格式:YYYY-MM-DD

status

string

通過執行狀態過濾:success, failure, pending, timeout

tool

string

通過工具 ID 過濾

toolType

string

通過工具類型過濾:api, function, mcp

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得特定工具執行紀錄

GET /api/v1/tool-execution-records/{id}/

參數

參數名稱
必填
類型
說明

id

string

A UUID string identifying this 工具執行記錄.

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得執行紀錄的 AI 助理過濾選項

GET /api/v1/tool-execution-records/chatbots/

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得執行紀錄的工具過濾選項

GET /api/v1/tool-execution-records/tools/

參數

參數名稱
必填
類型
說明

chatbot

string

endDate

string

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

query

string

startDate

string

status

string

`success`: 成功 ; `failure`: 失敗 ; `pending`: 處理中 ; `timeout`: 逾時;

tool

string

toolType

string

`api`: API ; `function`: Function ; `mcp`: MCP ; `desktop`: Desktop ; `flex`: Flex Message ; `quick_reply`: Quick Reply;

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得特定工具的執行紀錄列表

GET /api/v1/tools/{toolPk}/tool-execution-records/

參數

參數名稱
必填
類型
說明

toolPk

string

chatbot

string

通過 AI 助理 ID 過濾

endDate

string

結束日期(包含當日),格式:YYYY-MM-DD

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

query

string

搜尋 AI 助理名稱、工具名稱、訊息內容

startDate

string

開始日期(包含當日),格式:YYYY-MM-DD

status

string

通過執行狀態過濾:success, failure, pending, timeout

tool

string

通過工具 ID 過濾

toolType

string

通過工具類型過濾:api, function, mcp

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得特定工具的特定執行紀錄

GET /api/v1/tools/{toolPk}/tool-execution-records/{id}/

參數

參數名稱
必填
類型
說明

id

string

A UUID string identifying this 工具執行記錄.

toolPk

string

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得特定工具執行紀錄的 AI 助理過濾選項

GET /api/v1/tools/{toolPk}/tool-execution-records/chatbots/

參數

參數名稱
必填
類型
說明

toolPk

string

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


取得特定工具執行紀錄的工具過濾選項

GET /api/v1/tools/{toolPk}/tool-execution-records/tools/

參數

參數名稱
必填
類型
說明

toolPk

string

chatbot

string

endDate

string

page

integer

A page number within the paginated result set.

pageSize

integer

Number of results to return per page.

query

string

startDate

string

status

string

`success`: 成功 ; `failure`: 失敗 ; `pending`: 處理中 ; `timeout`: 逾時;

tool

string

toolType

string

`api`: API ; `function`: Function ; `mcp`: MCP ; `desktop`: Desktop ; `flex`: Flex Message ; `quick_reply`: Quick Reply;

程式碼範例

回應內容

狀態碼: 200

回應結構範例

回應範例值


Last updated

Was this helpful?