Query tool list¶
Lists the current workspace and system tools readable by the current identity. Lists do not return large input and output schemas by default; explicitly request the full view when needed.
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/tools
Before you call¶
Prepare a personal access token and target workspace ID that has access to the target workspace.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: The workspace ID to be queried is passed through theX-Workspace-IDHeader.
Request example¶
curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/tools?kind=http_api&limit=20&offset=0" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The current workspace ID. |
Query parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
No |
Filter by tool properties. |
|
string |
No |
Filter by tool properties. |
|
string |
No |
Filter by tool properties. |
|
string |
No |
Filter by tool properties. |
|
string |
No |
Filter by tool properties. |
|
string |
No |
Filter by tool properties. |
|
string |
No |
Filter by runtime visibility, binding type, or directory. |
|
string |
No |
Filter by runtime visibility, binding type, or directory. |
|
string |
No |
Filter by runtime visibility, binding type, or directory. |
|
string |
No |
Filter by tag; can be provided repeatedly. |
|
boolean |
No |
When |
|
string |
No |
|
|
integer |
No |
Returns the quantity and starting offset. If not provided, the default is 50, offset 0; |
|
integer |
No |
Returns the quantity and starting offset. If not provided, the default is 50, offset 0; |
Successful response¶
Returns 200 on success.
{
"code": 0,
"data": {
"items": [
{
"id": "tool_01",
"workspace_id": "ws_01",
"name": "查询工具",
"display_name": "查询工具",
"status": "active",
"kind": "http_api",
"side_effect_class": "read",
"version": 1,
"bindable": true,
"supported_runtimes": []
}
],
"total": 1,
"limit": 20,
"offset": 0
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
array |
Tools matching filter criteria. |
|
string |
Tool, owning workspace and original name. |
|
string |
Tool, owning workspace and original name. |
|
string |
Tool, owning workspace and original name. |
|
string |
Tool description; does not return if not set. |
|
string |
The name and description of the projection in the current language. |
|
string |
The name and description of the projection in the current language. |
|
string |
Tool status, category and side effect classification. |
|
string |
Tool status, category and side effect classification. |
|
string |
Tool status, category and side effect classification. |
|
string |
Tool classification; does not return if not set. |
|
object |
Tool source reference; not returned if not set. |
|
object |
Synchronization status; does not return if not set. |
|
integer |
Tool version. |
|
boolean |
Current binding capabilities and supported operating environments. |
|
string |
Current binding capabilities and supported operating environments. |
|
string[] |
Current binding capabilities and supported operating environments. |
|
object |
Returned only if |
|
object |
Returned only if |
|
string |
Creator ID; does not return if not set. |
|
string |
Last updater ID; does not return if not set. |
|
string |
Creation time, in RFC 3339 format. |
|
string |
Last updated time, in RFC 3339 format. |
|
integer |
Total number of matches, current page size, and offset. |
|
integer |
Total number of matches, current page size, and offset. |
|
integer |
Total number of matches, current page size, and offset. |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Error response¶
{
"code": 2,
"message": "<错误信息>"
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
Invalid filter or paging parameters. |
Check query parameters. |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The current identity does not have permission to read the tool directory. |
Check workspace authorization. |
|
|
Tool resource services or authorization dependencies are temporarily unavailable. |
Try again later. |
Follow-up operations¶
Save the identification of the target item and then Query tool details.