查詢 MCP 服務。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
starops:GetMcpService |
get |
*DigitalEmployee
|
無 | 無 |
請求文法
GET /digitalEmployee/{name}/mcpService/{mcpServiceName} HTTP/1.1
路徑參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| name |
string |
是 |
數位員工名稱。 |
test-agent |
| mcpServiceName |
string |
是 |
MCP 服務名稱。 |
log-query |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
當前API無需請求參數
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
介面返回資料。 |
||
| requestId |
string |
請求 ID。 |
0B9377D9-C56B-5C2E-A8A4-************ |
| regionId |
string |
當前請求地域。 |
cn-hangzhou |
| mcpService |
object |
MCP 服務詳情。 |
|
| displayName |
string |
MCP 服務顯示名稱。 |
日志查询 |
| description |
string |
MCP 服務描述資訊。 |
通过 MCP 调用日志查询工具。 |
| enable |
boolean |
是否啟用 MCP 服務。 |
true |
| network |
object |
網路連線資訊。 |
|
| mode |
string |
MCP 服務網路訪問模式,支援 public 和 vpc。 |
public |
| vpcId |
string |
Virtual Private Cloud ID。 |
vpc-xxx |
| vswId |
string |
交換器 ID。 |
vsw-xxx |
| accessIp |
string |
VPC 網路下訪問 MCP 服務的 IP 位址。 |
10.0.0.12 |
| accessPort |
integer |
VPC 網路下訪問 MCP 服務的連接埠,取值範圍為 1 到 65535。 |
8080 |
| securityGroupId |
string |
安全性群組 ID。 |
sg-xxx |
| gatewayId |
string |
網關 ID。 |
gw-xxx |
| mcpServerId |
string |
MCP Server 執行個體 ID。 |
mcp-xxx |
| region |
string |
VPC 網路所在地區。 |
cn-hangzhou |
| connection |
object |
MCP 服務連線配置。 |
|
| platform |
string |
MCP 服務平台類型,支援 AIGateway 和 Custom。 |
Custom |
| transport |
string |
MCP 服務傳輸協議,支援 http 和 sse。 |
http |
| endpoint |
string |
MCP 服務訪問地址。 |
https://example.com/mcp |
| timeout |
integer |
請求 MCP 服務的逾時時間,單位為毫秒。 |
5000 |
| auth |
object |
MCP 服務認證配置。 |
|
| type |
string |
認證類型,目前支援 bearer。 |
bearer |
| keyInfo |
object |
認證所需的索引值資訊。 |
{"token":"example-token"} |
|
string |
認證索引值資訊。 |
example-token |
|
| tools |
array<object> |
MCP 工具列表。 |
[{"name":"query_logs"}] |
|
array<object> |
單個 MCP 工具配置。 |
[{"name":"query_logs"}] |
|
| name |
string |
MCP 工具名稱。 |
query_logs |
| title |
string |
MCP 工具標題。 |
查询日志 |
| displayName |
string |
MCP 工具顯示名稱。 |
日志查询工具 |
| description |
string |
MCP 工具描述資訊。 |
查询指定日志库中的日志。 |
| inputSchema |
object |
MCP 工具輸入參數的 JSON Schema。 |
{"type":"object","properties":{"query":{"type":"string"}},"required":["query"]} |
|
any |
MCP 工具輸入 Schema 擴充欄位。 |
{"type":"string"} |
|
| outputSchema |
object |
MCP 工具輸出結果的 JSON Schema。 |
{"type":"object"} |
|
any |
MCP 工具輸出 Schema 擴充欄位。 |
{"type":"string"} |
|
| icons |
array<object> |
MCP 工具表徵圖列表。 |
[] |
|
object |
單個 MCP 工具配置。 |
[] |
|
|
any |
工具表徵圖擴充欄位。 |
https://example.com/icon.png |
|
| execution |
object |
MCP 工具執行配置。 |
{} |
|
any |
工具執行配置擴充欄位。 |
{} |
|
| annotations |
object |
MCP 工具註解資訊。 |
{} |
|
any |
工具註解擴充欄位。 |
{} |
|
| enable |
boolean |
是否啟用該 MCP 工具。 |
true |
| confirm |
boolean |
調用該 MCP 工具前是否需要使用者確認。 |
false |
| mcpServiceName |
string |
MCP 服務名稱。 |
log-query |
樣本
正常返回樣本
JSON格式
{
"requestId": "0B9377D9-C56B-5C2E-A8A4-************",
"regionId": "cn-hangzhou",
"mcpService": {
"displayName": "日志查询",
"description": "通过 MCP 调用日志查询工具。",
"enable": true,
"network": {
"mode": "public",
"vpcId": "vpc-xxx",
"vswId": "vsw-xxx",
"accessIp": "10.0.0.12",
"accessPort": 8080,
"securityGroupId": "sg-xxx",
"gatewayId": "gw-xxx",
"mcpServerId": "mcp-xxx",
"region": "cn-hangzhou"
},
"connection": {
"platform": "Custom",
"transport": "http",
"endpoint": "https://example.com/mcp",
"timeout": 5000,
"auth": {
"type": "bearer",
"keyInfo": {
"key": "example-token"
}
}
},
"tools": [
{
"name": "query_logs",
"title": "查询日志",
"displayName": "日志查询工具",
"description": "查询指定日志库中的日志。",
"inputSchema": {
"key": "{\"type\":\"string\"}"
},
"outputSchema": {
"key": "{\"type\":\"string\"}"
},
"icons": [
{
"key": "https://example.com/icon.png"
}
],
"execution": {
"key": "{}"
},
"annotations": {
"key": "{}"
},
"enable": true,
"confirm": false
}
],
"mcpServiceName": "log-query"
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。