Tool: create_toolset
Creates a new toolset in the given app.
The following sample demonstrate how to use curl to invoke the create_toolset MCP tool.
| Curl Request |
|---|
curl --location 'https://ces.[REGION].rep.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "create_toolset", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for AgentService.CreateToolset.
CreateToolsetRequest
| JSON representation |
|---|
{
"parent": string,
"toolsetId": string,
"toolset": {
object ( |
| Fields | |
|---|---|
parent |
Required. The resource name of the app to create a toolset in. |
toolsetId |
Optional. The ID to use for the toolset, which will become the final component of the toolset's resource name. If not provided, a unique ID will be automatically assigned for the toolset. |
toolset |
Required. The toolset to create. |
Toolset
| JSON representation |
|---|
{ "name": string, "displayName": string, "description": string, "createTime": string, "updateTime": string, "etag": string, "executionType": enum ( |
| Fields | |
|---|---|
name |
Identifier. The unique identifier of the toolset. Format: |
displayName |
Optional. The display name of the toolset. Must be unique within the same app. |
description |
Optional. The description of the toolset. |
createTime |
Output only. Timestamp when the toolset was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. Timestamp when the toolset was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
etag |
ETag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes. |
executionType |
Optional. The execution type of the tools in the toolset. |
toolFakeConfig |
Optional. Configuration for tools behavior in fake mode. |
Union field toolset_type. The type of the toolset. toolset_type can be only one of the following: |
|
mcpToolset |
Optional. A toolset that contains a list of tools that are offered by the MCP server. |
openApiToolset |
Optional. A toolset that contains a list of tools that are defined by an OpenAPI schema. |
connectorToolset |
Optional. A toolset that generates tools from an Integration Connectors Connection. |
McpToolset
| JSON representation |
|---|
{ "serverAddress": string, "apiAuthentication": { object ( |
| Fields | |
|---|---|
serverAddress |
Required. The address of the MCP server, for example, "https://example.com/mcp/". If the server is built with the MCP SDK, the url should be suffixed with "/mcp/". Only Streamable HTTP transport based servers are supported. See https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http for more details. |
apiAuthentication |
Optional. Authentication information required to access tools and execute a tool against the MCP server. For bearer token authentication, the token applies only to tool execution, not to listing tools. This requires that tools can be listed without authentication. |
serviceDirectoryConfig |
Optional. Service Directory configuration for VPC-SC, used to resolve service names within a perimeter. |
tlsConfig |
Optional. The TLS configuration. Includes the custom server certificates that the client should trust. |
ApiAuthentication
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field auth_config. The auth configuration. auth_config can be only one of the following: |
|
apiKeyConfig |
Optional. Config for API key auth. |
oauthConfig |
Optional. Config for OAuth. |
serviceAgentIdTokenAuthConfig |
Optional. Config for ID token auth generated from CES service agent. |
serviceAccountAuthConfig |
Optional. Config for service account authentication. |
bearerTokenConfig |
Optional. Config for bearer token auth. |
ApiKeyConfig
| JSON representation |
|---|
{
"keyName": string,
"apiKeySecretVersion": string,
"requestLocation": enum ( |
| Fields | |
|---|---|
keyName |
Required. The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key= |
apiKeySecretVersion |
Required. The name of the SecretManager secret version resource storing the API key. Format: Note: You should grant |
requestLocation |
Required. Key location in the request. |
OAuthConfig
| JSON representation |
|---|
{
"oauthGrantType": enum ( |
| Fields | |
|---|---|
oauthGrantType |
Required. OAuth grant types. |
clientId |
Required. The client ID from the OAuth provider. |
clientSecretVersion |
Required. The name of the SecretManager secret version resource storing the client secret. Format: Note: You should grant |
tokenEndpoint |
Required. The token endpoint in the OAuth provider to exchange for an access token. |
scopes[] |
Optional. The OAuth scopes to grant. |
ServiceAccountAuthConfig
| JSON representation |
|---|
{ "serviceAccount": string, "scopes": [ string ] } |
| Fields | |
|---|---|
serviceAccount |
Required. The email address of the service account used for authentication. CES uses this service account to exchange an access token and the access token is then sent in the The service account must have the |
scopes[] |
Optional. The OAuth scopes to grant. If not specified, the default scope |
BearerTokenConfig
| JSON representation |
|---|
{ "token": string } |
| Fields | |
|---|---|
token |
Required. The bearer token. Must be in the format |
ServiceDirectoryConfig
| JSON representation |
|---|
{ "service": string } |
| Fields | |
|---|---|
service |
Required. The name of Service Directory service. Format: |
TlsConfig
| JSON representation |
|---|
{
"caCerts": [
{
object ( |
| Fields | |
|---|---|
caCerts[] |
Required. Specifies a list of allowed custom CA certificates for HTTPS verification. |
CaCert
| JSON representation |
|---|
{ "displayName": string, "cert": string } |
| Fields | |
|---|---|
displayName |
Required. The name of the allowed custom CA certificates. This can be used to disambiguate the custom CA certificates. |
cert |
Required. The allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, CES will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") A base64-encoded string. |
OpenApiToolset
| JSON representation |
|---|
{ "openApiSchema": string, "apiAuthentication": { object ( |
| Fields | |
|---|---|
openApiSchema |
Required. The OpenAPI schema of the toolset. |
apiAuthentication |
Optional. Authentication information required by the API. |
tlsConfig |
Optional. The TLS configuration. Includes the custom server certificates |
serviceDirectoryConfig |
Optional. Service Directory configuration. |
ignoreUnknownFields |
Optional. If true, the agent will ignore unknown fields in the API response for all operations defined in the OpenAPI schema. |
url |
Optional. The server URL of the Open API schema. This field is only set in toolsets in the environment dependencies during the export process if the schema contains a server url. During the import process, if this url is present in the environment dependencies and the schema has the $env_var placeholder, it will replace the placeholder in the schema. |
ConnectorToolset
| JSON representation |
|---|
{ "connection": string, "authConfig": { object ( |
| Fields | |
|---|---|
connection |
Required. The full resource name of the referenced Integration Connectors Connection. Format: |
authConfig |
Optional. Configures how authentication is handled in Integration Connectors. By default, an admin authentication is passed in the Integration Connectors API requests. You can override it with a different end-user authentication config. Note: The Connection must have authentication override enabled in order to specify an EUC configuration here - otherwise, the Toolset creation will fail. See: https://cloud.google.com/application-integration/docs/configure-connectors-task#configure-authentication-override |
connectorActions[] |
Required. The list of connector actions/entity operations to generate tools for. |
EndUserAuthConfig
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field auth_config. The auth configuration. auth_config can be only one of the following: |
|
oauth2AuthCodeConfig |
Oauth 2.0 Authorization Code authentication. |
oauth2JwtBearerConfig |
JWT Profile Oauth 2.0 Authorization Grant authentication. |
Oauth2AuthCodeConfig
| JSON representation |
|---|
{ "oauthToken": string } |
| Fields | |
|---|---|
oauthToken |
Required. Oauth token parameter name to pass through. Must be in the format |
Oauth2JwtBearerConfig
| JSON representation |
|---|
{ "issuer": string, "subject": string, "clientKey": string } |
| Fields | |
|---|---|
issuer |
Required. Issuer parameter name to pass through. Must be in the format |
subject |
Required. Subject parameter name to pass through. Must be in the format |
clientKey |
Required. Client parameter name to pass through. Must be in the format |
Action
| JSON representation |
|---|
{ "inputFields": [ string ], "outputFields": [ string ], // Union field |
| Fields | |
|---|---|
inputFields[] |
Optional. Entity fields to use as inputs for the operation. If no fields are specified, all fields of the Entity will be used. |
outputFields[] |
Optional. Entity fields to return from the operation. If no fields are specified, all fields of the Entity will be returned. |
Union field action_spec. Specification for an action to configure for the tool to use. action_spec can be only one of the following: |
|
connectionActionId |
ID of a Connection action for the tool to use. |
entityOperation |
Entity operation configuration for the tool to use. |
EntityOperation
| JSON representation |
|---|
{
"entityId": string,
"operation": enum ( |
| Fields | |
|---|---|
entityId |
Required. ID of the entity. |
operation |
Required. Operation to perform on the entity. |
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
ToolFakeConfig
| JSON representation |
|---|
{ "enableFakeMode": boolean, // Union field |
| Fields | |
|---|---|
enableFakeMode |
Optional. Whether the tool is using fake mode. |
Union field tool_response. The response is either static or it is provided by a python function. tool_response can be only one of the following: |
|
codeBlock |
Optional. Code block which will be executed instead of a real tool call. |
CodeBlock
| JSON representation |
|---|
{ "pythonCode": string } |
| Fields | |
|---|---|
pythonCode |
Required. Python code which will be invoked in tool fake mode. Expected Python function signature - To catch all tool calls: def fake_tool_call(tool: Tool, input: dict[str, Any], callback_context: CallbackContext) -> Optional[dict[str, Any]]: To catch a specific tool call: def fake_{tool_id}(tool: Tool, input: dict[str, Any], callback_context: CallbackContext) -> Optional[dict[str, Any]]: If the function returns None, the real tool will be invoked instead. |
Output Schema
A toolset represents a group of dynamically managed tools that can be used by the agent.
Toolset
| JSON representation |
|---|
{ "name": string, "displayName": string, "description": string, "createTime": string, "updateTime": string, "etag": string, "executionType": enum ( |
| Fields | |
|---|---|
name |
Identifier. The unique identifier of the toolset. Format: |
displayName |
Optional. The display name of the toolset. Must be unique within the same app. |
description |
Optional. The description of the toolset. |
createTime |
Output only. Timestamp when the toolset was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. Timestamp when the toolset was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
etag |
ETag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes. |
executionType |
Optional. The execution type of the tools in the toolset. |
toolFakeConfig |
Optional. Configuration for tools behavior in fake mode. |
Union field toolset_type. The type of the toolset. toolset_type can be only one of the following: |
|
mcpToolset |
Optional. A toolset that contains a list of tools that are offered by the MCP server. |
openApiToolset |
Optional. A toolset that contains a list of tools that are defined by an OpenAPI schema. |
connectorToolset |
Optional. A toolset that generates tools from an Integration Connectors Connection. |
McpToolset
| JSON representation |
|---|
{ "serverAddress": string, "apiAuthentication": { object ( |
| Fields | |
|---|---|
serverAddress |
Required. The address of the MCP server, for example, "https://example.com/mcp/". If the server is built with the MCP SDK, the url should be suffixed with "/mcp/". Only Streamable HTTP transport based servers are supported. See https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http for more details. |
apiAuthentication |
Optional. Authentication information required to access tools and execute a tool against the MCP server. For bearer token authentication, the token applies only to tool execution, not to listing tools. This requires that tools can be listed without authentication. |
serviceDirectoryConfig |
Optional. Service Directory configuration for VPC-SC, used to resolve service names within a perimeter. |
tlsConfig |
Optional. The TLS configuration. Includes the custom server certificates that the client should trust. |
ApiAuthentication
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field auth_config. The auth configuration. auth_config can be only one of the following: |
|
apiKeyConfig |
Optional. Config for API key auth. |
oauthConfig |
Optional. Config for OAuth. |
serviceAgentIdTokenAuthConfig |
Optional. Config for ID token auth generated from CES service agent. |
serviceAccountAuthConfig |
Optional. Config for service account authentication. |
bearerTokenConfig |
Optional. Config for bearer token auth. |
ApiKeyConfig
| JSON representation |
|---|
{
"keyName": string,
"apiKeySecretVersion": string,
"requestLocation": enum ( |
| Fields | |
|---|---|
keyName |
Required. The parameter name or the header name of the API key. E.g., If the API request is "https://example.com/act?X-Api-Key= |
apiKeySecretVersion |
Required. The name of the SecretManager secret version resource storing the API key. Format: Note: You should grant |
requestLocation |
Required. Key location in the request. |
OAuthConfig
| JSON representation |
|---|
{
"oauthGrantType": enum ( |
| Fields | |
|---|---|
oauthGrantType |
Required. OAuth grant types. |
clientId |
Required. The client ID from the OAuth provider. |
clientSecretVersion |
Required. The name of the SecretManager secret version resource storing the client secret. Format: Note: You should grant |
tokenEndpoint |
Required. The token endpoint in the OAuth provider to exchange for an access token. |
scopes[] |
Optional. The OAuth scopes to grant. |
ServiceAccountAuthConfig
| JSON representation |
|---|
{ "serviceAccount": string, "scopes": [ string ] } |
| Fields | |
|---|---|
serviceAccount |
Required. The email address of the service account used for authentication. CES uses this service account to exchange an access token and the access token is then sent in the The service account must have the |
scopes[] |
Optional. The OAuth scopes to grant. If not specified, the default scope |
BearerTokenConfig
| JSON representation |
|---|
{ "token": string } |
| Fields | |
|---|---|
token |
Required. The bearer token. Must be in the format |
ServiceDirectoryConfig
| JSON representation |
|---|
{ "service": string } |
| Fields | |
|---|---|
service |
Required. The name of Service Directory service. Format: |
TlsConfig
| JSON representation |
|---|
{
"caCerts": [
{
object ( |
| Fields | |
|---|---|
caCerts[] |
Required. Specifies a list of allowed custom CA certificates for HTTPS verification. |
CaCert
| JSON representation |
|---|
{ "displayName": string, "cert": string } |
| Fields | |
|---|---|
displayName |
Required. The name of the allowed custom CA certificates. This can be used to disambiguate the custom CA certificates. |
cert |
Required. The allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, CES will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") A base64-encoded string. |
OpenApiToolset
| JSON representation |
|---|
{ "openApiSchema": string, "apiAuthentication": { object ( |
| Fields | |
|---|---|
openApiSchema |
Required. The OpenAPI schema of the toolset. |
apiAuthentication |
Optional. Authentication information required by the API. |
tlsConfig |
Optional. The TLS configuration. Includes the custom server certificates |
serviceDirectoryConfig |
Optional. Service Directory configuration. |
ignoreUnknownFields |
Optional. If true, the agent will ignore unknown fields in the API response for all operations defined in the OpenAPI schema. |
url |
Optional. The server URL of the Open API schema. This field is only set in toolsets in the environment dependencies during the export process if the schema contains a server url. During the import process, if this url is present in the environment dependencies and the schema has the $env_var placeholder, it will replace the placeholder in the schema. |
ConnectorToolset
| JSON representation |
|---|
{ "connection": string, "authConfig": { object ( |
| Fields | |
|---|---|
connection |
Required. The full resource name of the referenced Integration Connectors Connection. Format: |
authConfig |
Optional. Configures how authentication is handled in Integration Connectors. By default, an admin authentication is passed in the Integration Connectors API requests. You can override it with a different end-user authentication config. Note: The Connection must have authentication override enabled in order to specify an EUC configuration here - otherwise, the Toolset creation will fail. See: https://cloud.google.com/application-integration/docs/configure-connectors-task#configure-authentication-override |
connectorActions[] |
Required. The list of connector actions/entity operations to generate tools for. |
EndUserAuthConfig
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field auth_config. The auth configuration. auth_config can be only one of the following: |
|
oauth2AuthCodeConfig |
Oauth 2.0 Authorization Code authentication. |
oauth2JwtBearerConfig |
JWT Profile Oauth 2.0 Authorization Grant authentication. |
Oauth2AuthCodeConfig
| JSON representation |
|---|
{ "oauthToken": string } |
| Fields | |
|---|---|
oauthToken |
Required. Oauth token parameter name to pass through. Must be in the format |
Oauth2JwtBearerConfig
| JSON representation |
|---|
{ "issuer": string, "subject": string, "clientKey": string } |
| Fields | |
|---|---|
issuer |
Required. Issuer parameter name to pass through. Must be in the format |
subject |
Required. Subject parameter name to pass through. Must be in the format |
clientKey |
Required. Client parameter name to pass through. Must be in the format |
Action
| JSON representation |
|---|
{ "inputFields": [ string ], "outputFields": [ string ], // Union field |
| Fields | |
|---|---|
inputFields[] |
Optional. Entity fields to use as inputs for the operation. If no fields are specified, all fields of the Entity will be used. |
outputFields[] |
Optional. Entity fields to return from the operation. If no fields are specified, all fields of the Entity will be returned. |
Union field action_spec. Specification for an action to configure for the tool to use. action_spec can be only one of the following: |
|
connectionActionId |
ID of a Connection action for the tool to use. |
entityOperation |
Entity operation configuration for the tool to use. |
EntityOperation
| JSON representation |
|---|
{
"entityId": string,
"operation": enum ( |
| Fields | |
|---|---|
entityId |
Required. ID of the entity. |
operation |
Required. Operation to perform on the entity. |
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
ToolFakeConfig
| JSON representation |
|---|
{ "enableFakeMode": boolean, // Union field |
| Fields | |
|---|---|
enableFakeMode |
Optional. Whether the tool is using fake mode. |
Union field tool_response. The response is either static or it is provided by a python function. tool_response can be only one of the following: |
|
codeBlock |
Optional. Code block which will be executed instead of a real tool call. |
CodeBlock
| JSON representation |
|---|
{ "pythonCode": string } |
| Fields | |
|---|---|
pythonCode |
Required. Python code which will be invoked in tool fake mode. Expected Python function signature - To catch all tool calls: def fake_tool_call(tool: Tool, input: dict[str, Any], callback_context: CallbackContext) -> Optional[dict[str, Any]]: To catch a specific tool call: def fake_{tool_id}(tool: Tool, input: dict[str, Any], callback_context: CallbackContext) -> Optional[dict[str, Any]]: If the function returns None, the real tool will be invoked instead. |
Tool Annotations
Destructive Hint: ✅ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ❌