List tools
Updated at:
Lists the tool names, descriptions, and input schemas provided by an MCP service.
Endpoint
GET
/api/v1/mcp/servers/{mcpCode}/toolsReturns the tools currently available in the specified MCP service.
Path parameters
mcpCodestringRequiredMCP code
Response fields
data is an array of tools. Each tool contains the following fields:
namestring / nullTool name
descriptionstring / nullTool description
inputSchemaobject / nullTool input schema
inputSchema.typestring / nullUsually object
inputSchema.propertiesmap<string,object> / nullParameter definitions
inputSchema.requiredarray<string> / nullRequired parameter names
inputSchema.additionalPropertiesboolean / nullWhether additional parameters are allowed
Example
curl "https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/mcp/servers/mcp-a1b2c3d4e5f6g7h8/tools" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY"
Response example
{
"success": true,
"error_code": null,
"error_msg": null,
"data": [
{
"name": "get_weather",
"description": "Queries the weather in a specified city",
"inputSchema": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "City name"
}
},
"required": ["city"],
"additionalProperties": false
}
}
],
"request_id": "6f1c2a8e-3b0d-4c55-9a0e-2f7d1c9b8a11"
}
Error codes
| HTTP status | error_code | Description |
|---|---|---|
| 400 | - | The service is not activated, the instance is abnormal, or the tool list is empty. The error code is returned by the MCP service |
| 500 | InternalError | Internal service error |
NoteOne Key MCP services do not need to be activated in advance. The service may be activated automatically when tools are first listed or called.
Is this page helpful?