GetMcpService - 查询MCP服务
查询 MCP 服务
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
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 |
专有网络 VPC 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"
}
}