查詢 Tool / MCP 列表
查詢 Tool / MCP 列表
支援查詢指定組織下的 Tool 和 MCP 列表。
可以透過該 API,查詢指定組織下的 Tool 和 MCP 列表。
請求方式
GET
調用地址
https://api.${endpoint}/v1/org/tool/list
調用驗證
使用帳號級 DevKey / DevSecret 的 Basic 驗證。
請求
請求範例
curl -X GET 'https://api.${endpoint}/v1/org/tool/list?org_id=p-xxxx&plugin_type=TOOL&available=true&keyword=weather' \
-H 'Authorization: Basic ${BASIC_TOKEN}'
curl -X GET 'https://api.${endpoint}/v1/org/tool/list?org_id=p-xxxx&plugin_type=TOOL&available=true&keyword=weather' \
-H 'Authorization: Basic ${BASIC_TOKEN}'
此代碼塊在浮窗中顯示
請求標頭
| 欄位 | 類型 | 說明 |
|---|---|---|
| Authorization | Basic ${BASIC_TOKEN} | 使用 DevKey:DevSecret Base64 後的 Basic Token。 |
請求參數(Query Parameters)
| 參數 | 類型 | 說明 | required |
|---|---|---|---|
| org_id | String | 組織 ID。 | true |
| keyword | String | 關鍵字,依名稱或描述篩選。 | false |
| plugin_type | String | 資源類型,支援 TOOL、MCP;未傳入時回傳 Tool 與 MCP。 |
false |
| available | Boolean | 是否只回傳可用或不可用資源。 | false |
回應
回應範例
{
"code": 0,
"message": "OK",
"data": [
{
"resource_id": "tool-xxxx",
"name": "weather",
"display_name": "Weather Lookup",
"description": "Query current weather",
"logo": "https://cdn.example.com/weather.png",
"url": "https://api.example.com",
"plugin_type": "TOOL",
"available": true,
"action_count": 2,
"create_time": 1785826041000,
"update_time": 1785826041000
}
]
}
{
"code": 0,
"message": "OK",
"data": [
{
"resource_id": "tool-xxxx",
"name": "weather",
"display_name": "Weather Lookup",
"description": "Query current weather",
"logo": "https://cdn.example.com/weather.png",
"url": "https://api.example.com",
"plugin_type": "TOOL",
"available": true,
"action_count": 2,
"create_time": 1785826041000,
"update_time": 1785826041000
}
]
}
此代碼塊在浮窗中顯示
成功回應
| 欄位 | 類型 | 說明 |
|---|---|---|
| resource_id | String | Tool 或 MCP ID。 |
| name | String | 資源名稱。 |
| display_name | String | 顯示名稱。 |
| description | String | 描述。 |
| logo | String | 圖示 URL。 |
| url | String | 服務地址。 |
| plugin_type | String | 資源類型,TOOL 或 MCP。 |
| available | Boolean | 是否可用。 |
| action_count | Integer | Action 數量。 |
| create_time | Long | 建立時間,毫秒時間戳。 |
| update_time | Long | 更新時間,毫秒時間戳。 |
失敗回應
| 欄位 | 類型 | 說明 |
|---|---|---|
| code | Integer | 錯誤碼。 |
| message | String | 錯誤詳情。 |
狀態碼
| 狀態碼 | 說明 |
|---|---|
| 200 | 成功 |
| 400 | 參數錯誤 |
| 401 | 未授權 |
| 403 | 權限不足 |
| 429 | 請求過於頻繁 |
| 500 | 伺服器錯誤 |
