Class McpTool (0.4.0)

public final class McpTool extends GeneratedMessage implements McpToolOrBuilder

Message describing McpTool object

Protobuf type google.cloud.apiregistry.v1.McpTool

Implements

McpToolOrBuilder

Static Fields

ANNOTATIONS_FIELD_NUMBER

public static final int ANNOTATIONS_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

INPUT_SCHEMA_FIELD_NUMBER

public static final int INPUT_SCHEMA_FIELD_NUMBER
Field Value
Type Description
int

MCP_SERVER_URLS_FIELD_NUMBER

public static final int MCP_SERVER_URLS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

OUTPUT_SCHEMA_FIELD_NUMBER

public static final int OUTPUT_SCHEMA_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static McpTool getDefaultInstance()
Returns
Type Description
McpTool

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static McpTool.Builder newBuilder()
Returns
Type Description
McpTool.Builder

newBuilder(McpTool prototype)

public static McpTool.Builder newBuilder(McpTool prototype)
Parameter
Name Description
prototype McpTool
Returns
Type Description
McpTool.Builder

parseDelimitedFrom(InputStream input)

public static McpTool parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
McpTool
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static McpTool parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpTool
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static McpTool parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
McpTool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static McpTool parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpTool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static McpTool parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
McpTool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static McpTool parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpTool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static McpTool parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
McpTool
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static McpTool parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpTool
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static McpTool parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
McpTool
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static McpTool parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpTool
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static McpTool parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
McpTool
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static McpTool parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpTool
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<McpTool> parser()
Returns
Type Description
Parser<McpTool>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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.

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.

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.

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 int

The 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 int

The 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.

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

getParserForType()

public Parser<McpTool> getParserForType()
Returns
Type Description
Parser<McpTool>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public McpTool.Builder newBuilderForType()
Returns
Type Description
McpTool.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected McpTool.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
McpTool.Builder
Overrides

toBuilder()

public McpTool.Builder toBuilder()
Returns
Type Description
McpTool.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException