You need to enable JavaScript to run this app.
文档中心
AgentKit

AgentKit

复制全文
下载 pdf
MCP
CreateMCPToolset - 创建MCP工具集。
复制全文
下载 pdf
CreateMCPToolset - 创建MCP工具集。
创建MCP工具集。​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:CreateMCPToolset​
要执行的操作,取值:CreateMCPToolset。​
​
Version string 必选 示例值:2025-10-30​
API的版本,取值:2025-10-30。​
​
AuthorizerConfiguration.Authorizer.KeyAuth.ApiKeyLocation string 可选 示例值:HEADER​
使用API Key进行入站身份认证鉴权时,APIKey传递的位置。取值:​
  • HEADER:当前仅支持Header。​
说明​
当AuthorizerType取值为ApiKey时必填。​
​
AuthorizerConfiguration.Authorizer.CustomJwtAuthorizer.DiscoveryUrl string 必选 示例值:--​
使用OAuth JWT进行入站身份认证鉴权时,认证服务地址。​
说明​
当AuthorizerType取值为CustomJWT时必填。​
​
AuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Name string[] 必选 示例值:ark-authkey​
使用API Key进行入站身份认证鉴权时,APIKey的名称。​
  • 参数 - N:表示APIKey名称的序号,取值范围:1~5。​
  • 多个字段名之间用&分隔。​
  • 长度为4 ~ 64的字符串。​
  • 由字母、数字、“-”和“_”组成。​
说明​
当AuthorizerType取值为ApiKey时必填。​
​
AuthorizerConfiguration.Authorizer.CustomJwtAuthorizer.AllowedClients.N string[] 可选 示例值:--​
使用OAuth JWT进行入站身份认证鉴权时,允许访问的客户端列表。​
说明​
当AuthorizerType取值为CustomJWT时必填。​
​
AuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Key string[] 可选 示例值:8b02f2e2-ae83-11f0-b6e5-******​
使用API Key进行入站身份认证鉴权时,APIKey的值。​
  • 参数 - N:表示APIKey值的序号,取值范围:1~5。​
  • 多个字段名之间用&分隔。​
  • 不填则默认随机生成一个字符串。​
说明​
当AuthorizerType取值为ApiKey时必填。​
​
AuthorizerConfiguration.Authorizer.KeyAuth.Parameter string 可选 示例值:Authorization​
使用API Key进行入站身份认证鉴权时,访问MCP工具集需要携带的Header的APIKey对应的名称。​
说明​
当AuthorizerType取值为ApiKey时必填。​
​
AuthorizerConfiguration.AuthorizerType string 必选 示例值:ApiKey​
MCP工具集入站身份认证安全的类型,取值:​
  • ApiKey:使用API Key认证。​
  • CustomJWT:使用OAuth JWT认证。​
​
ClientToken string 可选 示例值:65a075a2-aeff-****-b294-00163e72f914​
保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。​
取值:仅支持ASCII字符,且不能超过64个字符。​
​
MCPServiceIds.N string[] 可选 示例值:m-ye7f4f7gu8q7oi5cu***​
MCP服务。​
  • 参数 - N:表示MCP服务的序号,取值范围:1~100。​
  • 多个字段名之间用&分隔。​
​
Name string 必选 示例值:ToolsetName​
MCP工具集名称。​
  • 长度为4-64的字符串。​
  • 由字母、数字、“-”和“_”组成。​
​
Path string 必选 示例值:/mcp​
MCP工具集的访问路径。​
​
MCPServices.N.IsAllTools boolean[] 必选 示例值:true​
是否包含MCP服务下所有工具。​
​
NetworkConfiguration.EnablePrivateNetwork boolean 可选 示例值:true​
是否开启运行时的私网访问能力,取值:​
  • true:开启。​
  • false(默认):不开启。​
说明​
EnablePrivateNetwork和EnablePublicNetwork参数,必须传入其中一个。​
​
MCPServices.N.MCPServiceId string[] 必选 示例值:m-ye7f6gd7nktv3gi6c***​
MCP服务的ID。​
​
NetworkConfiguration.EnablePublicNetwork boolean 可选 示例值:true​
是否开启运行时的公网访问能力,取值:​
  • true(默认):开启。​
  • false:不开启。​
说明​
EnablePrivateNetwork和EnablePublicNetwork参数,必须传入其中一个。​
​
MCPServices.N.MCPTools.N.Name string[] 必选 示例值:add-comments​
MCP工具的名称。​
​
NetworkConfiguration.VpcConfiguration.VpcId string 必选 示例值:vpc-ye7s6jatq8rxg218****​
私有网络ID。​
说明​
当EnablePrivateNetwork取值为ture时必选。​
​
MCPServices.N.MCPTools.N.Description string[] 可选 示例值:add comments​
MCP工具的描述。​
​
NetworkConfiguration.VpcConfiguration.SecurityGroupIds.N string[] 可选 示例值:SecurityGroupIds.1=sg-w08tvkc3e****​
安全组ID列表。​
说明​
当EnablePrivateNetwork取值为ture时必选。​
​
MCPServices.N.MCPTools.N.Tags.N string[] 可选 示例值:1​
MCP工具的标签。​
​
NetworkConfiguration.VpcConfiguration.SubnetIds.N string[] 可选 示例值:SubnetIds.1=subnet-ye7s6jatq8rxg218****​
子网ID列表,每个可用区只能指定一个子网ID。​
  • 参数 N:取值1 ~ 5。​
说明​
当EnablePrivateNetwork取值为ture时必选。​
​
Mode string 必选 示例值:AllTools​
工具集调用工具的检索模式。​
  • AllTools:全量返回工具。​
  • SemanticSearch:语义检索,通过语义匹配工具。​
  • TagSearch:标签检索。通过标签精准搜索工具。​
​
ProjectName string 可选 示例值:default​
所属项目名称。​
​
Tags.N.Key string[] 必选 示例值:K1​
为资源添加的用户标签的标签键。​
  • 参数 - N:表示标签键的序号,取值范围:1~50。​
  • 多个标签键之间用&分隔。​
命名规则如下:​
  • 不能以任何大小写形式的volc:或sys:开头。​
volc:或sys:开头为系统预留标签键禁止创建。​
  • 只能包含语言字符、数字、空格和英文符号“_”、“.”、“:”、“/”、“=”、“+”、“-”、“@”。​
  • 长度限制在1~128个字符之间。​
​
Tags.N.Value string[] 可选 示例值:v1​
为资源添加的用户标签的标签值。​
  • 参数 - N:表示标签值的序号,取值范围:1~50。​
  • 多个标签值之间用&分隔。​
命名规则如下:​
  • 只能包含语言字符、数字、空格和英文符号“_”、“.”、“:”、“/”、“=”、“+”、“-”、“@”。​
  • 允许为空,长度限制在0~256个字符之间。​
​
Tags.N.Type string[] 可选 示例值:system​
标签类型。​
  • system:系统标签。​
  • custom:用户标签。​
​
GatewayInstanceId string 可选 示例值:gw-********​
MCP工具集关联的专属网关实例ID。​
  • 仅当GatewayMode取值为Exclusive时,需传入此参数。​
  • 您可在AgentKit控制台“网关 > 网关实例 > 专属网关”中获取专属网关实例ID。​
​
GatewayMode string 可选 示例值:Shared | Exclusive​
MCP工具集的网关模式。​
  • Shared(默认):共享网关。​
  • Exclusive:专属网关。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
MCPToolsetId string 示例值:mt-ye7s6jatq8rxg218****​
MCP工具集ID。​
​
​
​
请求示例​
​
POST https://agentkit.cn-beijing.volcengineapi.com?Action=CreateMCPToolset&Version=2025-10-30 HTTP/1.1​
Content-Type: application/json​
{​
"Name": "****",​
"NetworkConfigurations": [​
{​
"NetworkType":"Public"​
}​
],​
"MCPServiceIds": [​
"m-ye7d2dz37kmc0z***"​
],​
"Path": "/toolset",​
"AuthorizerConfiguration": {​
"AuthorizerType": "ApiKey",​
"Authorizer": {​
"KeyAuth": {​
"ApiKeys": [​
{​
"Name": "ts-***"​
}​
],​
"ApiKeyLocation": "HEADER"​
}​
}​
}​
}​
​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202106111445100102252431000052****",​
"Action": "CreateMCPToolset",​
"Version": "2025-10-30",​
"Service": "agentkit",​
"Region": "cn-beijing"​
},​
"Result": {​
"MCPToolsetId": "mt-ye7s6jatq8rxg218****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidApiKeyLocation.Malformed​
The specified ApiKeyLocation is malformed.​
指定的ApiKeyLocation不合法。​
400​
InvalidAuthorizerType.Malformed​
The specified AuthorizerType is malformed.​
指定的AuthorizerType不合法。​
400​
InvalidName.Malformed​
The specified Name is malformed.​
指定的Name不合法。​
400​
InvalidNetworkType.Malformed​
The specified NetworkType is malformed.​
指定的NetworkType不合法。​
400​
InvalidParameter.MCPServices​
The parameter MCPServices is invalid.​
参数MCPServices不合法。​
400​
LimitExceeded.MaximumApiKeys​
The number of specified ApiKeys exceeds the maximum limit.​
指定的ApiKeys超过最大限制。​
400​
LimitExceeded.MaximumMCPServiceIds​
The number of specified MCPServiceIds exceeds the maximum limit.​
指定的MCPServiceIds超过最大限制。​
400​
LimitExceeded.MaximumSubnetIds​
The number of specified SubnetIds exceeds the maximum limit.​
指定的SubnetIds超过最大限制。​
400​
LimitExceeded.MinimumApiKeys​
The number of specified ApiKeys exceeds the minimum limit.​
指定的ApiKeys超过最小限制。​
400​
LimitExceeded.MinimumMCPServiceIds​
The number of specified MCPServiceIds exceeds the minimum limit.​
指定的MCPServiceIds超过最小限制。​
400​
LimitExceeded.MinimumSubnetIds​
The number of specified SubnetIds exceeds the minimum limit.​
指定的SubnetIds超过最小限制。​
400​
MissingParameter.ApiKeyLocation​
The required parameter ApiKeyLocation is not supplied.​
参数ApiKeyLocation不能为空。​
400​
MissingParameter.ApiKeys​
The required parameter ApiKeys is not supplied.​
参数ApiKeys不能为空。​
400​
MissingParameter.AuthorizerType​
The required parameter AuthorizerType is not supplied.​
参数AuthorizerType不能为空。​
400​
MissingParameter.DiscoveryUrl​
The required parameter DiscoveryUrl is not supplied.​
参数DiscoveryUrl不能为空。​
400​
MissingParameter.IsAllTools​
The required parameter IsAllTools is not supplied.​
参数IsAllTools不能为空。​
400​
MissingParameter.Key​
The required parameter Key is not supplied.​
参数Key不能为空。​
400​
MissingParameter.MCPServiceId​
The required parameter MCPServiceId is not supplied.​
参数MCPServiceId不能为空。​
400​
MissingParameter.MCPServiceIds​
The required parameter MCPServiceIds is not supplied.​
参数MCPServiceIds不能为空。​
400​
MissingParameter.MCPServices​
The parameter MCPServices is not supplied.​
MCP 服务不能为空。​
400​
MissingParameter.Mode​
The required parameter Mode is not supplied.​
参数Mode不能为空。​
400​
MissingParameter.Name​
The required parameter Name is not supplied.​
名称不能为空。​
400​
MissingParameter.NetworkConfiguration​
The required parameter NetworkConfiguration is not supplied.​
参数NetworkConfiguration不能为空。​
400​
MissingParameter.NetworkConfigurations​
The required parameter NetworkConfigurations is not supplied.​
参数NetworkConfigurations不能为空。​
400​
MissingParameter.NetworkType​
The required parameter NetworkType is not supplied.​
参数NetworkType不能为空。​
400​
MissingParameter.Parameter​
The required parameter Parameter is not supplied.​
参数Parameter不能为空。​
400​
MissingParameter.Path​
The required parameter Path is not supplied.​
参数Path不能为空。​
400​
MissingParameter.VpcId​
The required parameter VpcId is not supplied.​
参数VpcId不能为空。​
404​
InvalidMCPService.NotFound​
The specified MCPServiceId does not exist.​
指定的MCPServiceId不存在。​
500​
InternalError​
An internal error has occurred.​
系统内部错误。​
​
​
最近更新时间:2026.09.14 19:28:44
这个页面对您有帮助吗?
有用
有用
无用
无用