// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.ces.v1;

import "google/api/field_behavior.proto";
import "google/cloud/ces/v1/auth.proto";
import "google/cloud/ces/v1/common.proto";

option go_package = "cloud.google.com/go/ces/apiv1/cespb;cespb";
option java_multiple_files = true;
option java_outer_classname = "McpToolsetProto";
option java_package = "com.google.cloud.ces.v1";

// A toolset that contains a list of tools that are offered by the MCP
// server.
message McpToolset {
  // 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.
  string server_address = 1 [(google.api.field_behavior) = REQUIRED];

  // 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.
  ApiAuthentication api_authentication = 2
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. Service Directory configuration for VPC-SC, used to resolve
  // service names within a perimeter.
  ServiceDirectoryConfig service_directory_config = 3
      [(google.api.field_behavior) = OPTIONAL];

  // Optional. The TLS configuration. Includes the custom server certificates
  // that the client should trust.
  TlsConfig tls_config = 4 [(google.api.field_behavior) = OPTIONAL];

  // Optional. The custom headers to send in the request to the MCP server. The
  // values must be in the format `$context.variables.<name_of_variable>` and
  // can be set in the session variables. See
  // https://docs.cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool/open-api#openapi-injection
  // for more details.
  map<string, string> custom_headers = 5
      [(google.api.field_behavior) = OPTIONAL];
}
