Class McpTool.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<McpTool.Builder>
com.google.cloud.apiregistry.v1beta.McpTool.Builder
All Implemented Interfaces:
McpToolOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
McpTool

public static final class McpTool.Builder extends com.google.protobuf.GeneratedMessage.Builder<McpTool.Builder> implements McpToolOrBuilder
 Message describing McpTool object
 
Protobuf type google.cloud.apiregistry.v1beta.McpTool
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<McpTool.Builder>
    • clear

      public McpTool.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<McpTool.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<McpTool.Builder>
    • getDefaultInstanceForType

      public McpTool getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public McpTool build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public McpTool buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public McpTool.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<McpTool.Builder>
    • mergeFrom

      public McpTool.Builder mergeFrom(McpTool other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<McpTool.Builder>
    • mergeFrom

      public McpTool.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<McpTool.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Identifier. The resource name of the McpTool.
       Format:
       `projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}`.
       Example:
       projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp/mcpTools/insert_job
       for 1p
       projects/12345/locations/us-central1/mcpServers/apphub:starbucks/mcpTools/order_pizza
       for 2p
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface McpToolOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. The resource name of the McpTool.
       Format:
       `projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}`.
       Example:
       projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp/mcpTools/insert_job
       for 1p
       projects/12345/locations/us-central1/mcpServers/apphub:starbucks/mcpTools/order_pizza
       for 2p
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface McpToolOrBuilder
      Returns:
      The bytes for name.
    • setName

      public McpTool.Builder setName(String value)
       Identifier. The resource name of the McpTool.
       Format:
       `projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}`.
       Example:
       projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp/mcpTools/insert_job
       for 1p
       projects/12345/locations/us-central1/mcpServers/apphub:starbucks/mcpTools/order_pizza
       for 2p
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public McpTool.Builder clearName()
       Identifier. The resource name of the McpTool.
       Format:
       `projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}`.
       Example:
       projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp/mcpTools/insert_job
       for 1p
       projects/12345/locations/us-central1/mcpServers/apphub:starbucks/mcpTools/order_pizza
       for 2p
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public McpTool.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. The resource name of the McpTool.
       Format:
       `projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}`.
       Example:
       projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp/mcpTools/insert_job
       for 1p
       projects/12345/locations/us-central1/mcpServers/apphub:starbucks/mcpTools/order_pizza
       for 2p
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Optional. A human-readable name for the tool, suitable for display.
       
      string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDisplayName in interface McpToolOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Optional. A human-readable name for the tool, suitable for display.
       
      string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDisplayNameBytes in interface McpToolOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public McpTool.Builder setDisplayName(String value)
       Optional. A human-readable name for the tool, suitable for display.
       
      string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public McpTool.Builder clearDisplayName()
       Optional. A human-readable name for the tool, suitable for display.
       
      string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public McpTool.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Optional. A human-readable name for the tool, suitable for display.
       
      string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       A human-readable description of the tool's functionality.
       
      string description = 3;
      Specified by:
      getDescription in interface McpToolOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       A human-readable description of the tool's functionality.
       
      string description = 3;
      Specified by:
      getDescriptionBytes in interface McpToolOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public McpTool.Builder setDescription(String value)
       A human-readable description of the tool's functionality.
       
      string description = 3;
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public McpTool.Builder clearDescription()
       A human-readable description of the tool's functionality.
       
      string description = 3;
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public McpTool.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       A human-readable description of the tool's functionality.
       
      string description = 3;
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getMcpServerUrlsList

      public com.google.protobuf.ProtocolStringList getMcpServerUrlsList()
       Automatically populated reference to MCP Server. Helpful when multiple
       tools are requested across different MCP Servers.
       
      repeated string mcp_server_urls = 4;
      Specified by:
      getMcpServerUrlsList in interface McpToolOrBuilder
      Returns:
      A list containing the mcpServerUrls.
    • getMcpServerUrlsCount

      public int getMcpServerUrlsCount()
       Automatically populated reference to MCP Server. Helpful when multiple
       tools are requested across different MCP Servers.
       
      repeated string mcp_server_urls = 4;
      Specified by:
      getMcpServerUrlsCount in interface McpToolOrBuilder
      Returns:
      The count of mcpServerUrls.
    • getMcpServerUrls

      public String getMcpServerUrls(int index)
       Automatically populated reference to MCP Server. Helpful when multiple
       tools are requested across different MCP Servers.
       
      repeated string mcp_server_urls = 4;
      Specified by:
      getMcpServerUrls in interface McpToolOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The mcpServerUrls at the given index.
    • getMcpServerUrlsBytes

      public com.google.protobuf.ByteString getMcpServerUrlsBytes(int index)
       Automatically populated reference to MCP Server. Helpful when multiple
       tools are requested across different MCP Servers.
       
      repeated string mcp_server_urls = 4;
      Specified by:
      getMcpServerUrlsBytes in interface McpToolOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the mcpServerUrls at the given index.
    • setMcpServerUrls

      public McpTool.Builder setMcpServerUrls(int index, String value)
       Automatically populated reference to MCP Server. Helpful when multiple
       tools are requested across different MCP Servers.
       
      repeated string mcp_server_urls = 4;
      Parameters:
      index - The index to set the value at.
      value - The mcpServerUrls to set.
      Returns:
      This builder for chaining.
    • addMcpServerUrls

      public McpTool.Builder addMcpServerUrls(String value)
       Automatically populated reference to MCP Server. Helpful when multiple
       tools are requested across different MCP Servers.
       
      repeated string mcp_server_urls = 4;
      Parameters:
      value - The mcpServerUrls to add.
      Returns:
      This builder for chaining.
    • addAllMcpServerUrls

      public McpTool.Builder addAllMcpServerUrls(Iterable<String> values)
       Automatically populated reference to MCP Server. Helpful when multiple
       tools are requested across different MCP Servers.
       
      repeated string mcp_server_urls = 4;
      Parameters:
      values - The mcpServerUrls to add.
      Returns:
      This builder for chaining.
    • clearMcpServerUrls

      public McpTool.Builder clearMcpServerUrls()
       Automatically populated reference to MCP Server. Helpful when multiple
       tools are requested across different MCP Servers.
       
      repeated string mcp_server_urls = 4;
      Returns:
      This builder for chaining.
    • addMcpServerUrlsBytes

      public McpTool.Builder addMcpServerUrlsBytes(com.google.protobuf.ByteString value)
       Automatically populated reference to MCP Server. Helpful when multiple
       tools are requested across different MCP Servers.
       
      repeated string mcp_server_urls = 4;
      Parameters:
      value - The bytes of the mcpServerUrls to add.
      Returns:
      This builder for chaining.
    • hasInputSchema

      public boolean hasInputSchema()
       A JSON Schema object defining the expected parameters for invoking the
       tool.
       
      .google.protobuf.Struct input_schema = 5;
      Specified by:
      hasInputSchema in interface McpToolOrBuilder
      Returns:
      Whether the inputSchema field is set.
    • getInputSchema

      public com.google.protobuf.Struct getInputSchema()
       A JSON Schema object defining the expected parameters for invoking the
       tool.
       
      .google.protobuf.Struct input_schema = 5;
      Specified by:
      getInputSchema in interface McpToolOrBuilder
      Returns:
      The inputSchema.
    • setInputSchema

      public McpTool.Builder setInputSchema(com.google.protobuf.Struct value)
       A JSON Schema object defining the expected parameters for invoking the
       tool.
       
      .google.protobuf.Struct input_schema = 5;
    • setInputSchema

      public McpTool.Builder setInputSchema(com.google.protobuf.Struct.Builder builderForValue)
       A JSON Schema object defining the expected parameters for invoking the
       tool.
       
      .google.protobuf.Struct input_schema = 5;
    • mergeInputSchema

      public McpTool.Builder mergeInputSchema(com.google.protobuf.Struct value)
       A JSON Schema object defining the expected parameters for invoking the
       tool.
       
      .google.protobuf.Struct input_schema = 5;
    • clearInputSchema

      public McpTool.Builder clearInputSchema()
       A JSON Schema object defining the expected parameters for invoking the
       tool.
       
      .google.protobuf.Struct input_schema = 5;
    • getInputSchemaBuilder

      public com.google.protobuf.Struct.Builder getInputSchemaBuilder()
       A JSON Schema object defining the expected parameters for invoking the
       tool.
       
      .google.protobuf.Struct input_schema = 5;
    • getInputSchemaOrBuilder

      public com.google.protobuf.StructOrBuilder getInputSchemaOrBuilder()
       A JSON Schema object defining the expected parameters for invoking the
       tool.
       
      .google.protobuf.Struct input_schema = 5;
      Specified by:
      getInputSchemaOrBuilder in interface McpToolOrBuilder
    • hasOutputSchema

      public boolean hasOutputSchema()
       Optional. A JSON Schema object defining the expected structure of the
       tool's output.
       
      .google.protobuf.Struct output_schema = 6;
      Specified by:
      hasOutputSchema in interface McpToolOrBuilder
      Returns:
      Whether the outputSchema field is set.
    • getOutputSchema

      public com.google.protobuf.Struct getOutputSchema()
       Optional. A JSON Schema object defining the expected structure of the
       tool's output.
       
      .google.protobuf.Struct output_schema = 6;
      Specified by:
      getOutputSchema in interface McpToolOrBuilder
      Returns:
      The outputSchema.
    • setOutputSchema

      public McpTool.Builder setOutputSchema(com.google.protobuf.Struct value)
       Optional. A JSON Schema object defining the expected structure of the
       tool's output.
       
      .google.protobuf.Struct output_schema = 6;
    • setOutputSchema

      public McpTool.Builder setOutputSchema(com.google.protobuf.Struct.Builder builderForValue)
       Optional. A JSON Schema object defining the expected structure of the
       tool's output.
       
      .google.protobuf.Struct output_schema = 6;
    • mergeOutputSchema

      public McpTool.Builder mergeOutputSchema(com.google.protobuf.Struct value)
       Optional. A JSON Schema object defining the expected structure of the
       tool's output.
       
      .google.protobuf.Struct output_schema = 6;
    • clearOutputSchema

      public McpTool.Builder clearOutputSchema()
       Optional. A JSON Schema object defining the expected structure of the
       tool's output.
       
      .google.protobuf.Struct output_schema = 6;
    • getOutputSchemaBuilder

      public com.google.protobuf.Struct.Builder getOutputSchemaBuilder()
       Optional. A JSON Schema object defining the expected structure of the
       tool's output.
       
      .google.protobuf.Struct output_schema = 6;
    • getOutputSchemaOrBuilder

      public com.google.protobuf.StructOrBuilder getOutputSchemaOrBuilder()
       Optional. A JSON Schema object defining the expected structure of the
       tool's output.
       
      .google.protobuf.Struct output_schema = 6;
      Specified by:
      getOutputSchemaOrBuilder in interface McpToolOrBuilder
    • hasAnnotations

      public boolean hasAnnotations()
       Optional key-value object that allows developers to provide additional
       information regarding tool properties, behavior, and usage best practices.
       Annotations or tags to facilitate semantic search across tools ("semantic
       tags") are not in the MVP scope. When implemented, the first set of
       supported annotations will likely be the standard, predefined annotations
       from the open-source MCP spec. These include:
       - title: A human-readable title for the tool, useful for UI display.
       - readOnlyHint: If true, indicates the tool does not modify its
       environment.
       - destructiveHint: If true, the tool may perform destructive updates
       (only meaningful when readOnlyHint is false).
       - idempotentHint: If true, calling the tool repeatedly with the same
       arguments has no additional effect (only meaningful when readOnlyHint is
       false).
       - openWorldHint: If true, the tool may interact with an "open world" of
       external entities.
       
      .google.protobuf.Struct annotations = 7;
      Specified by:
      hasAnnotations in interface McpToolOrBuilder
      Returns:
      Whether the annotations field is set.
    • getAnnotations

      public com.google.protobuf.Struct getAnnotations()
       Optional key-value object that allows developers to provide additional
       information regarding tool properties, behavior, and usage best practices.
       Annotations or tags to facilitate semantic search across tools ("semantic
       tags") are not in the MVP scope. When implemented, the first set of
       supported annotations will likely be the standard, predefined annotations
       from the open-source MCP spec. These include:
       - title: A human-readable title for the tool, useful for UI display.
       - readOnlyHint: If true, indicates the tool does not modify its
       environment.
       - destructiveHint: If true, the tool may perform destructive updates
       (only meaningful when readOnlyHint is false).
       - idempotentHint: If true, calling the tool repeatedly with the same
       arguments has no additional effect (only meaningful when readOnlyHint is
       false).
       - openWorldHint: If true, the tool may interact with an "open world" of
       external entities.
       
      .google.protobuf.Struct annotations = 7;
      Specified by:
      getAnnotations in interface McpToolOrBuilder
      Returns:
      The annotations.
    • setAnnotations

      public McpTool.Builder setAnnotations(com.google.protobuf.Struct value)
       Optional key-value object that allows developers to provide additional
       information regarding tool properties, behavior, and usage best practices.
       Annotations or tags to facilitate semantic search across tools ("semantic
       tags") are not in the MVP scope. When implemented, the first set of
       supported annotations will likely be the standard, predefined annotations
       from the open-source MCP spec. These include:
       - title: A human-readable title for the tool, useful for UI display.
       - readOnlyHint: If true, indicates the tool does not modify its
       environment.
       - destructiveHint: If true, the tool may perform destructive updates
       (only meaningful when readOnlyHint is false).
       - idempotentHint: If true, calling the tool repeatedly with the same
       arguments has no additional effect (only meaningful when readOnlyHint is
       false).
       - openWorldHint: If true, the tool may interact with an "open world" of
       external entities.
       
      .google.protobuf.Struct annotations = 7;
    • setAnnotations

      public McpTool.Builder setAnnotations(com.google.protobuf.Struct.Builder builderForValue)
       Optional key-value object that allows developers to provide additional
       information regarding tool properties, behavior, and usage best practices.
       Annotations or tags to facilitate semantic search across tools ("semantic
       tags") are not in the MVP scope. When implemented, the first set of
       supported annotations will likely be the standard, predefined annotations
       from the open-source MCP spec. These include:
       - title: A human-readable title for the tool, useful for UI display.
       - readOnlyHint: If true, indicates the tool does not modify its
       environment.
       - destructiveHint: If true, the tool may perform destructive updates
       (only meaningful when readOnlyHint is false).
       - idempotentHint: If true, calling the tool repeatedly with the same
       arguments has no additional effect (only meaningful when readOnlyHint is
       false).
       - openWorldHint: If true, the tool may interact with an "open world" of
       external entities.
       
      .google.protobuf.Struct annotations = 7;
    • mergeAnnotations

      public McpTool.Builder mergeAnnotations(com.google.protobuf.Struct value)
       Optional key-value object that allows developers to provide additional
       information regarding tool properties, behavior, and usage best practices.
       Annotations or tags to facilitate semantic search across tools ("semantic
       tags") are not in the MVP scope. When implemented, the first set of
       supported annotations will likely be the standard, predefined annotations
       from the open-source MCP spec. These include:
       - title: A human-readable title for the tool, useful for UI display.
       - readOnlyHint: If true, indicates the tool does not modify its
       environment.
       - destructiveHint: If true, the tool may perform destructive updates
       (only meaningful when readOnlyHint is false).
       - idempotentHint: If true, calling the tool repeatedly with the same
       arguments has no additional effect (only meaningful when readOnlyHint is
       false).
       - openWorldHint: If true, the tool may interact with an "open world" of
       external entities.
       
      .google.protobuf.Struct annotations = 7;
    • clearAnnotations

      public McpTool.Builder clearAnnotations()
       Optional key-value object that allows developers to provide additional
       information regarding tool properties, behavior, and usage best practices.
       Annotations or tags to facilitate semantic search across tools ("semantic
       tags") are not in the MVP scope. When implemented, the first set of
       supported annotations will likely be the standard, predefined annotations
       from the open-source MCP spec. These include:
       - title: A human-readable title for the tool, useful for UI display.
       - readOnlyHint: If true, indicates the tool does not modify its
       environment.
       - destructiveHint: If true, the tool may perform destructive updates
       (only meaningful when readOnlyHint is false).
       - idempotentHint: If true, calling the tool repeatedly with the same
       arguments has no additional effect (only meaningful when readOnlyHint is
       false).
       - openWorldHint: If true, the tool may interact with an "open world" of
       external entities.
       
      .google.protobuf.Struct annotations = 7;
    • getAnnotationsBuilder

      public com.google.protobuf.Struct.Builder getAnnotationsBuilder()
       Optional key-value object that allows developers to provide additional
       information regarding tool properties, behavior, and usage best practices.
       Annotations or tags to facilitate semantic search across tools ("semantic
       tags") are not in the MVP scope. When implemented, the first set of
       supported annotations will likely be the standard, predefined annotations
       from the open-source MCP spec. These include:
       - title: A human-readable title for the tool, useful for UI display.
       - readOnlyHint: If true, indicates the tool does not modify its
       environment.
       - destructiveHint: If true, the tool may perform destructive updates
       (only meaningful when readOnlyHint is false).
       - idempotentHint: If true, calling the tool repeatedly with the same
       arguments has no additional effect (only meaningful when readOnlyHint is
       false).
       - openWorldHint: If true, the tool may interact with an "open world" of
       external entities.
       
      .google.protobuf.Struct annotations = 7;
    • getAnnotationsOrBuilder

      public com.google.protobuf.StructOrBuilder getAnnotationsOrBuilder()
       Optional key-value object that allows developers to provide additional
       information regarding tool properties, behavior, and usage best practices.
       Annotations or tags to facilitate semantic search across tools ("semantic
       tags") are not in the MVP scope. When implemented, the first set of
       supported annotations will likely be the standard, predefined annotations
       from the open-source MCP spec. These include:
       - title: A human-readable title for the tool, useful for UI display.
       - readOnlyHint: If true, indicates the tool does not modify its
       environment.
       - destructiveHint: If true, the tool may perform destructive updates
       (only meaningful when readOnlyHint is false).
       - idempotentHint: If true, calling the tool repeatedly with the same
       arguments has no additional effect (only meaningful when readOnlyHint is
       false).
       - openWorldHint: If true, the tool may interact with an "open world" of
       external entities.
       
      .google.protobuf.Struct annotations = 7;
      Specified by:
      getAnnotationsOrBuilder in interface McpToolOrBuilder