查询 Tool / MCP 列表
查询 Tool / MCP 列表
支持查询指定组织下的 Tool 和 MCP 列表。
可以通过该接口,查询指定组织下的 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 | 服务器错误 |
