Update tool¶
Partially update the platform tools in the current workspace. Tools will not create new tools if the current workspace does not exist.
PATCH $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/tools/{tool_id}
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First Query tool details confirm the tool to be updated. Prepare the personal access token, target workspace ID, and tool ID that can access the target workspace.
Request body¶
curl -X PATCH "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/tools/$TOOL_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"description": "更新后的说明",
"status": "active"
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Current workspace ID. |
|
string |
Yes |
Tool ID to update. |
|
string |
No |
The workspace the tool belongs to. It can only be the current workspace or |
|
string |
No |
Tool name, description, status, category and display information. The status can be |
|
string |
No |
Tool name, description, status, category and display information. The status can be |
|
string |
No |
Tool name, description, status, category and display information. The status can be |
|
string |
No |
Tool name, description, status, category and display information. The status can be |
|
string |
No |
Tool name, description, status, category and display information. The status can be |
|
string |
No |
Tool name, description, status, category and display information. The status can be |
|
string |
No |
Tool name, description, status, category and display information. The status can be |
|
array of string |
No |
Tools label. Providing this field replaces the original label. The resource version will not be incremented when updating only |
|
object |
No |
Source. Can include |
|
object |
No |
Input and output JSON Schema. |
|
object |
No |
Input and output JSON Schema. |
|
string |
No |
Side effect classification: |
|
string |
No |
Credentials, approvals, and desensitization policy references. |
|
string |
No |
Credentials, approvals, and desensitization policy references. |
|
string |
No |
Credentials, approvals, and desensitization policy references. |
|
object |
No |
Synchronization status, which can include |
|
object |
No |
Market metadata, tags, annotations and extended metadata. |
|
object |
No |
Market metadata, tags, annotations and extended metadata. |
|
object |
No |
Market metadata, tags, annotations and extended metadata. |
|
object |
No |
Market metadata, tags, annotations and extended metadata. |
labels and annotations require a JSON object whose value can only be a string or null. When updating, omit or the entire value is null to retain the original value, and the empty object {} clears the original object.
The fields in the request body are optional. Fields not provided retain their original values.
MCP tools cannot modify kind, source_ref or credential_ref through this interface. Nor can you update a normal tool to an MCP tool.
Successful response¶
{
"code": 0,
"data": {
"id": "tool_01",
"workspace_id": "ws_01",
"name": "查询工具",
"description": "更新后的说明",
"status": "active",
"kind": "http_api",
"side_effect_class": "read",
"version": 2,
"bindable": true,
"supported_runtimes": [],
"created_at": "2026-01-02T15:04:05Z",
"updated_at": "2026-01-02T15:04:05Z",
"display_name": "示例工具",
"source_ref": {},
"sync": {}
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
object |
The result of this request. |
|
string |
Tool ID. |
|
string |
The identity of the workspace to which it belongs. |
|
string |
Name. |
|
string |
Description. Can be omitted if empty or not set. |
|
string |
Display name. |
|
string |
Show instructions. Can be omitted if empty or not set. |
|
string |
status. Preferable |
|
string |
Tool type. Preferable |
|
string |
classification. Can be omitted if empty or not set. |
|
string |
Icon reference. Can be omitted if empty or not set. |
|
array |
label. Can be omitted if empty or not set. |
|
string |
use stage. Can be omitted if empty or not set. |
|
object |
Market metadata. Can be omitted if empty or not set. |
|
object |
An empty object is returned when the source information has no subfields. |
|
string |
Source type. Can be omitted if empty or not set. |
|
string |
Source object ID, the specific type is specified by |
|
string |
Source address. Can be omitted if empty or not set. |
|
string |
Version number. Can be omitted if empty or not set. |
|
object |
Resource allocation. Can be omitted if empty or not set. |
|
object |
Tool input JSON Schema. Can be omitted if empty or not set. |
|
object |
The tool outputs JSON Schema. Can be omitted if empty or not set. |
|
string |
Classification of side effects. Preferable |
|
string |
Credentials reference. Can be omitted if empty or not set. |
|
string |
Approval policy reference. Can be omitted if empty or not set. |
|
string |
Desensitization strategies cited. Can be omitted if empty or not set. |
|
object |
An empty object is returned when the synchronization information has no subfields. |
|
string |
status. Can be omitted if empty or not set. |
|
string or null |
Last sync time. Can be omitted if empty or not set. |
|
string |
Recent sync errors. Can be omitted if empty or not set. |
|
integer |
Version number. |
|
object |
Extension tag. Can be omitted if empty or not set. |
|
object |
Extended comments. Can be omitted if empty or not set. |
|
object |
Extended metadata. Can be omitted if empty or not set. |
|
boolean |
Whether it can be bound. |
|
string |
Description of binding capabilities. Can be omitted if empty or not set. |
|
array |
Supported runtimes. Can be omitted if empty or not set. |
|
string |
Creator ID. Can be omitted if empty or not set. |
|
string |
Last updated by identifier. Can be omitted if empty or not set. |
|
string |
Creation time. Use RFC 3339 format. |
|
string |
Last updated time. Use RFC 3339 format. |
Error response¶
{
"code": 2,
"message": "<错误信息>"
}
Common HTTP errors
HTTP status code |
error code |
Description |
|---|---|---|
|
|
Common Cause: The path, request field, or MCP tool update scope is invalid. Recommended Action: Check the tool ID, field values, and tool category limits. |
|
|
Common Cause: Valid identity credentials are missing. Recommended Action: Check the API Key. |
|
|
Common reasons: The current identity does not have permission to update the tool. Recommended Action: Check the workspace authorization. |
|
|
Common Cause: The specified system tool is read-only. Recommended Action: Do not modify system tools. Create or update your own tools in the current workspace. |
|
|
Common reasons: The tool does not exist in the specified workspace. Recommended Action: Check the tool ID and |
|
|
Common reasons: Tool resource services or authorization dependencies are temporarily unavailable. Recommended Action: Try again later. |