Skip to main content

List tools

Lists the tool names, descriptions, and input schemas provided by an MCP service.

Endpoint

GET /api/v1/mcp/servers/{mcpCode}/tools Returns the tools currently available in the specified MCP service.

Request parameters

ParameterTypeRequiredDescription
mcpCodestringYesMCP code

Response

data is an array of tools. Each tool contains the following fields:
FieldTypeDescription
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"
{
  "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"
}

Errors

HTTP statuserror_codeDescription
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
500InternalErrorInternal service error
One Key MCP services do not need to be activated in advance. The service may be activated automatically when tools are first listed or called.