public static final class McpTool.Builder extends GeneratedMessage.Builder<McpTool.Builder> implements McpToolOrBuilderMessage describing McpTool object
Protobuf type google.cloud.apiregistry.v1beta.McpTool
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > McpTool.BuilderImplements
McpToolOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllMcpServerUrls(Iterable<String> values)
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;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The mcpServerUrls to add. |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
addMcpServerUrls(String value)
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;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe mcpServerUrls to add. |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
addMcpServerUrlsBytes(ByteString value)
public McpTool.Builder addMcpServerUrlsBytes(ByteString value)Automatically populated reference to MCP Server. Helpful when multiple tools are requested across different MCP Servers.
repeated string mcp_server_urls = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the mcpServerUrls to add. |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
build()
public McpTool build()| Returns | |
|---|---|
| Type | Description |
McpTool |
|
buildPartial()
public McpTool buildPartial()| Returns | |
|---|---|
| Type | Description |
McpTool |
|
clear()
public McpTool.Builder clear()| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
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;
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
clearDescription()
public McpTool.Builder clearDescription()A human-readable description of the tool's functionality.
string description = 3;
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
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 | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
clearInputSchema()
public McpTool.Builder clearInputSchema()A JSON Schema object defining the expected parameters for invoking the tool.
.google.protobuf.Struct input_schema = 5;
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
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 | |
|---|---|
| Type | Description |
McpTool.Builder |
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 | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
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;
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
getAnnotations()
public 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;
| Returns | |
|---|---|
| Type | Description |
Struct |
The annotations. |
getAnnotationsBuilder()
public 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;
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getAnnotationsOrBuilder()
public 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;
| Returns | |
|---|---|
| Type | Description |
StructOrBuilder |
|
getDefaultInstanceForType()
public McpTool getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
McpTool |
|
getDescription()
public String getDescription()A human-readable description of the tool's functionality.
string description = 3;
| Returns | |
|---|---|
| Type | Description |
String |
The description. |
getDescriptionBytes()
public ByteString getDescriptionBytes()A human-readable description of the tool's functionality.
string description = 3;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for description. |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDisplayName()
public String getDisplayName()Optional. A human-readable name for the tool, suitable for display.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The displayName. |
getDisplayNameBytes()
public ByteString getDisplayNameBytes()Optional. A human-readable name for the tool, suitable for display.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for displayName. |
getInputSchema()
public Struct getInputSchema()A JSON Schema object defining the expected parameters for invoking the tool.
.google.protobuf.Struct input_schema = 5;
| Returns | |
|---|---|
| Type | Description |
Struct |
The inputSchema. |
getInputSchemaBuilder()
public Struct.Builder getInputSchemaBuilder()A JSON Schema object defining the expected parameters for invoking the tool.
.google.protobuf.Struct input_schema = 5;
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getInputSchemaOrBuilder()
public StructOrBuilder getInputSchemaOrBuilder()A JSON Schema object defining the expected parameters for invoking the tool.
.google.protobuf.Struct input_schema = 5;
| Returns | |
|---|---|
| Type | Description |
StructOrBuilder |
|
getMcpServerUrls(int index)
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;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The mcpServerUrls at the given index. |
getMcpServerUrlsBytes(int index)
public 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;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the mcpServerUrls at the given index. |
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;
| Returns | |
|---|---|
| Type | Description |
int |
The count of mcpServerUrls. |
getMcpServerUrlsList()
public ProtocolStringList getMcpServerUrlsList()Automatically populated reference to MCP Server. Helpful when multiple tools are requested across different MCP Servers.
repeated string mcp_server_urls = 4;
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the mcpServerUrls. |
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];
| Returns | |
|---|---|
| Type | Description |
String |
The name. |
getNameBytes()
public 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];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for name. |
getOutputSchema()
public Struct getOutputSchema()Optional. A JSON Schema object defining the expected structure of the tool's output.
.google.protobuf.Struct output_schema = 6;
| Returns | |
|---|---|
| Type | Description |
Struct |
The outputSchema. |
getOutputSchemaBuilder()
public Struct.Builder getOutputSchemaBuilder()Optional. A JSON Schema object defining the expected structure of the tool's output.
.google.protobuf.Struct output_schema = 6;
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getOutputSchemaOrBuilder()
public StructOrBuilder getOutputSchemaOrBuilder()Optional. A JSON Schema object defining the expected structure of the tool's output.
.google.protobuf.Struct output_schema = 6;
| Returns | |
|---|---|
| Type | Description |
StructOrBuilder |
|
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;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the annotations field is set. |
hasInputSchema()
public boolean hasInputSchema()A JSON Schema object defining the expected parameters for invoking the tool.
.google.protobuf.Struct input_schema = 5;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the inputSchema field is set. |
hasOutputSchema()
public boolean hasOutputSchema()Optional. A JSON Schema object defining the expected structure of the tool's output.
.google.protobuf.Struct output_schema = 6;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the outputSchema field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeAnnotations(Struct value)
public McpTool.Builder mergeAnnotations(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;
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
mergeFrom(McpTool other)
public McpTool.Builder mergeFrom(McpTool other)| Parameter | |
|---|---|
| Name | Description |
other |
McpTool |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public McpTool.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public McpTool.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
mergeInputSchema(Struct value)
public McpTool.Builder mergeInputSchema(Struct value)A JSON Schema object defining the expected parameters for invoking the tool.
.google.protobuf.Struct input_schema = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
mergeOutputSchema(Struct value)
public McpTool.Builder mergeOutputSchema(Struct value)Optional. A JSON Schema object defining the expected structure of the tool's output.
.google.protobuf.Struct output_schema = 6;
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
setAnnotations(Struct value)
public McpTool.Builder setAnnotations(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;
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
setAnnotations(Struct.Builder builderForValue)
public McpTool.Builder setAnnotations(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;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
setDescription(String value)
public McpTool.Builder setDescription(String value)A human-readable description of the tool's functionality.
string description = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe description to set. |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
setDescriptionBytes(ByteString value)
public McpTool.Builder setDescriptionBytes(ByteString value)A human-readable description of the tool's functionality.
string description = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for description to set. |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
setDisplayName(String value)
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];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe displayName to set. |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
setDisplayNameBytes(ByteString value)
public McpTool.Builder setDisplayNameBytes(ByteString value)Optional. A human-readable name for the tool, suitable for display.
string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for displayName to set. |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
setInputSchema(Struct value)
public McpTool.Builder setInputSchema(Struct value)A JSON Schema object defining the expected parameters for invoking the tool.
.google.protobuf.Struct input_schema = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
setInputSchema(Struct.Builder builderForValue)
public McpTool.Builder setInputSchema(Struct.Builder builderForValue)A JSON Schema object defining the expected parameters for invoking the tool.
.google.protobuf.Struct input_schema = 5;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
setMcpServerUrls(int index, String value)
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 | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe mcpServerUrls to set. |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
setName(String value)
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];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe name to set. |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public McpTool.Builder setNameBytes(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];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
This builder for chaining. |
setOutputSchema(Struct value)
public McpTool.Builder setOutputSchema(Struct value)Optional. A JSON Schema object defining the expected structure of the tool's output.
.google.protobuf.Struct output_schema = 6;
| Parameter | |
|---|---|
| Name | Description |
value |
Struct |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|
setOutputSchema(Struct.Builder builderForValue)
public McpTool.Builder setOutputSchema(Struct.Builder builderForValue)Optional. A JSON Schema object defining the expected structure of the tool's output.
.google.protobuf.Struct output_schema = 6;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
McpTool.Builder |
|