Create MCP tools in batches¶
Batch create tools from detected or saved MCP connections as workspace tools.
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/connections/actions/batch-create-mcp-tools
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. Prepare a personal access token and target workspace ID that can access the target workspace.
Request body¶
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/connections/actions/batch-create-mcp-tools" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"connection_id": "'"$CONNECTION_ID"'",
"items": [
{
"tool_name": "search_docs",
"name": "搜索文档"
}
]
}'
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
Saved MCP connection ID. |
|
string |
No |
The name of the new connection. |
|
string |
No |
The MCP service address of the new connection. |
|
string |
No |
MCP transmission method. |
|
string |
No |
Authentication type. |
|
string |
No |
The request header name used by API Key. |
|
object |
No |
MCP credentials. |
|
string |
No |
The visible range of new connections. |
|
array of object |
Yes |
List of MCP tools to create. |
|
string |
Yes |
MCP service discovery tool name. |
|
string |
No |
Local tool name. When omitted, the discovered tool name is used. |
|
string |
No |
Tool description. |
|
object |
No |
Tool input schema. |
|
object |
No |
Tool output Schema. |
|
array of string |
No |
Tools label. |
|
string |
No |
Tool classification. |
Upstream tools are rediscovered before batch creation. The current discovery results overwrite the submitted description, input schema, and output schema. The upstream tool definition is subject to the current discovery results.
Successful response¶
{
"code": 0,
"data": {
"connection": {
"id": "id_example",
"workspace_id": "workspace_example",
"name": "",
"status": "draft",
"kind": "model_api",
"endpoint_uri": "",
"auth_type": "none",
"visibility": "private",
"version": 1,
"created_at": "2026-10-14T00:00:00Z",
"updated_at": "2026-10-14T00:00:00Z"
},
"connection_status": "created",
"items": []
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
object |
response data. |
|
object |
Connection information. |
|
string |
Object ID. |
|
string |
The workspace ID to which it belongs. |
|
string |
Name. |
|
string |
Description. Can be omitted if not set. |
|
string |
Current status. Values: |
|
string |
Connection type. Values: |
|
string |
Service endpoint address. |
|
string |
Authentication method. Values: |
|
string |
A reference to a saved credential, not a clear-text key. Can be omitted if not set. |
|
array of string |
List of available capabilities. Can be omitted if not set. |
|
string |
The user ID to which it belongs. Can be omitted if not set. |
|
string |
Visible range. Value: |
|
object |
Non-sensitive configuration, fields vary with connection or channel type. Can be omitted if not set. |
|
string |
The most recent test status, either succeeded or failed. Can be omitted if not set. Value: |
|
string |
The most recent test time, in RFC 3339 format. Can be omitted if not set. |
|
string |
Error description for recent tests. Can be omitted if not set. |
|
integer |
Current version number. |
|
object |
Tag key-value pairs. Can be omitted if not set. |
|
object |
Extended annotations. Can be omitted if not set. |
|
object |
Extended metadata. Can be omitted if not set. |
|
string |
Creator ID. Can be omitted if not set. |
|
string |
Last updated by identifier. Can be omitted if not set. |
|
string |
Creation time, in RFC 3339 format. |
|
string |
Last updated in RFC 3339 format. |
|
object |
Connection status. Values: |
|
array of object |
Create results in batches. |
|
string |
Tool name. |
|
object |
Current status. Values: |
|
object |
Tools to create or reuse. Can be omitted if not set. |
|
string |
Object ID. |
|
string |
The workspace ID to which it belongs. |
|
string |
Name. |
|
string |
Description. Can be omitted if not set. |
|
string |
Display name. |
|
string |
Show instructions. Can be omitted if not set. |
|
string |
Current status. Values: |
|
string |
Connection type. Values: |
|
string |
Resource classification. Can be omitted if not set. |
|
string |
Icon reference. Can be omitted if not set. |
|
array of string |
tag list. Can be omitted if not set. |
|
string |
processing stage. Can be omitted if not set. |
|
object |
Market display metadata. Can be omitted if not set. |
|
object |
Source cited. |
|
string |
Operation type. Can be omitted if not set. |
|
string |
Object ID. Can be omitted if not set. |
|
string |
Resource address. Can be omitted if not set. |
|
string |
Current version number. Can be omitted if not set. |
|
object |
Non-sensitive configuration, fields vary with connection or channel type. Can be omitted if not set. |
|
object |
JSON Schema of the input parameters. Can be omitted if not set. |
|
object |
JSON Schema of the output result. Can be omitted if not set. |
|
string |
Classification of side effects. Values: |
|
string |
A reference to a saved credential, not a clear-text key. Can be omitted if not set. |
|
string |
Approval policy reference. Can be omitted if not set. |
|
string |
Desensitization strategies cited. Can be omitted if not set. |
|
object |
Sync results. |
|
string |
Current status. Can be omitted if not set. |
|
string |
Last sync time. Can be omitted if not set. |
|
string |
Error description for recent sync. Can be omitted if not set. |
|
integer |
Current version number. |
|
object |
Tag key-value pairs. Can be omitted if not set. |
|
object |
Extended annotations. Can be omitted if not set. |
|
object |
Extended metadata. Can be omitted if not set. |
|
boolean |
Whether it can be bound. |
|
string |
The reason why it can be bound. Can be omitted if not set. |
|
array of string |
Supported operating modes. Can be omitted if not set. |
|
string |
Creator ID. Can be omitted if not set. |
|
string |
Last updated by identifier. Can be omitted if not set. |
|
string |
Creation time, in RFC 3339 format. |
|
string |
Last updated in RFC 3339 format. |
|
object |
Error details. Can be omitted if not set. |
|
string |
error code. |
|
string |
Operating Instructions. |
Error response¶
{
"code": 2,
"message": "invalid request"
}
Field |
Type |
Description |
|---|---|---|
|
integer |
error code. |
|
string |
Error message for the caller. |