Method: projects.locations.collections.dataConnector.invokeConnectorMcp

Makes a call to an MCP connector.

HTTP request

POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}:invokeConnectorMcp

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. DataConnector resource.

The data connector used for making the MCP call.

Request body

The request body contains data with the following structure:

JSON representation
{
  "method": string,
  "params": {
    object
  },
  "engine": string
}
Fields
method

string

Required. The method to invoke (e.g. "tools/list", "tools/call", "resources/read", "prompts/get", etc.).

params

object (Struct format)

Optional. Arbitrary structured parameters for the method.

Using google.protobuf.Struct keeps the payload schema-flexible, matching JSON-RPC's free-form params field.

engine

string

Optional. The engine resource name (e.g. "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}"). Used as the search engine ID when invoking tool registry tools that issue Discovery Search Service requests.

Response body

Response message returning the result of an MCP connector invocation. It contains either a successful result payload or error details.

If successful, the response body contains data with the following structure:

JSON representation
{

  // Union field payload can be only one of the following:
  "result": value,
  "error": {
    object (McpError)
  }
  // End of list of possible types for union field payload.
}
Fields
Union field payload. Exactly one of result or error should be set. payload can be only one of the following:
result

value (Value format)

Successful result — arbitrary structured data.

error

object (McpError)

Error details when the call fails.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.serving.readwrite

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • discoveryengine.dataConnectors.executeAction

For more information, see the IAM documentation.

McpError

McpError represents error details when an MCP call fails. This structure follows the JSON-RPC 2.0 error object shape.

JSON representation
{
  "code": integer,
  "message": string,
  "data": value
}
Fields
code

integer

Numeric error code.

message

string

Short, human-readable description of the error.

data

value (Value format)

Optional structured data with additional error context.