Query tool details¶
Read the current workspace tool or readable system tool. The detailed response contains the input and output Schema.
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/tools/{tool_id}
Before you call¶
First query the tool list to obtain the tool ID. 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: Target workspace ID, passed throughX-Workspace-IDHeader.$TOOL_ID: Tool ID to be queried.
Request example¶
curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/tools/$TOOL_ID" \
-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. |
|
string |
Yes |
The tool ID to be queried. |
Query parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
No |
ID of the workspace to which the tool belongs. If not provided, the current workspace is used; only the current workspace or the system workspace can be specified. |
Successful response¶
Returns 200 on success.
{
"code": 0,
"data": {
"id": "tool_01",
"workspace_id": "ws_01",
"name": "查询工具",
"status": "active",
"kind": "http_api",
"input_schema": {},
"output_schema": {},
"side_effect_class": "read",
"version": 1,
"bindable": true,
"supported_runtimes": []
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
string |
Tool ID, workspace and name. |
|
string |
Tool ID, workspace and name. |
|
string |
Tool ID, workspace and name. |
|
string |
Tool status, category and classification. |
|
string |
Tool status, category and classification. |
|
string |
Tool status, category and classification. |
|
object |
Tool input and output Schema. |
|
object |
Tool input and output Schema. |
|
string |
The side effects classification of the tool. |
|
string |
Credentials, approval and desensitization policy references; not returned if not set. |
|
string |
Credentials, approval and desensitization policy references; not returned if not set. |
|
string |
Credentials, approval and desensitization policy references; not returned if not set. |
|
boolean |
Current binding capabilities, reasons for unbinding, and supported operating environments. |
|
string |
Current binding capabilities, reasons for unbinding, and supported operating environments. |
|
string[] |
Current binding capabilities, reasons for unbinding, and supported operating environments. |
|
integer |
Tool version and creation, latest update time. |
|
string |
Tool version, creation, and latest update time. |
|
string |
Tool version, creation, and latest update time. |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Error response¶
{
"code": 3,
"message": "tool not found"
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
Invalid path or |
Check path and query parameters. |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The current identity does not have permission to read the tool. |
Check workspace authorization. |
|
|
The tool does not exist within the specified workspace. |
Check tool ID and belonging workspace. |
|
|
Tool resource services or authorization dependencies are temporarily unavailable. |
Try again later. |
Follow-up operations¶
When modifications are needed Update tool. When returning the list Query tool tag.