- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- McpError
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 |
Required. 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 |
Required. The method to invoke (e.g. "tools/list", "tools/call", "resources/read", "prompts/get", etc.). |
params |
Optional. Arbitrary structured parameters for the method. Using google.protobuf.Struct keeps the payload schema-flexible, matching JSON-RPC's free-form |
engine |
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 |
| Fields | |
|---|---|
Union field payload. Exactly one of result or error should be set. payload can be only one of the following: |
|
result |
Successful result — arbitrary structured data. |
error |
Error details when the call fails. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/discoveryengine.assist.readwritehttps://www.googleapis.com/auth/discoveryengine.readwritehttps://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 |
Numeric error code. |
message |
Short, human-readable description of the error. |
data |
Optional structured data with additional error context. |