Interface McpToolOrBuilder (0.4.0)

public interface McpToolOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getAnnotations()

public abstract 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 abstract 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

getDescription()

public abstract String getDescription()

A human-readable description of the tool's functionality.

string description = 3;

Returns
Type Description
String

The description.

getDescriptionBytes()

public abstract ByteString getDescriptionBytes()

A human-readable description of the tool's functionality.

string description = 3;

Returns
Type Description
ByteString

The bytes for description.

getDisplayName()

public abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract List<String> 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
List<String>

A list containing the mcpServerUrls.

getName()

public abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract 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.