Google Cloud Api Registry V1beta Client - Class McpTool (0.1.0)

Reference documentation and code samples for the Google Cloud Api Registry V1beta Client class McpTool.

Message describing McpTool object

Generated from protobuf message google.cloud.apiregistry.v1beta.McpTool

Namespace

Google \ Cloud \ ApiRegistry \ V1beta

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

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

↳ display_name string

Optional. A human-readable name for the tool, suitable for display.

↳ description string

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

↳ mcp_server_urls array

Automatically populated reference to MCP Server. Helpful when multiple tools are requested across different MCP Servers.

↳ input_schema Google\Protobuf\Struct

A JSON Schema object defining the expected parameters for invoking the tool.

↳ output_schema Google\Protobuf\Struct

Optional. A JSON Schema object defining the expected structure of the tool's output.

↳ annotations Google\Protobuf\Struct

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.

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

Returns
Type Description
string

setName

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

Parameter
Name Description
var string
Returns
Type Description
$this

getDisplayName

Optional. A human-readable name for the tool, suitable for display.

Returns
Type Description
string

setDisplayName

Optional. A human-readable name for the tool, suitable for display.

Parameter
Name Description
var string
Returns
Type Description
$this

getDescription

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

Returns
Type Description
string

setDescription

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

Parameter
Name Description
var string
Returns
Type Description
$this

getMcpServerUrls

Automatically populated reference to MCP Server. Helpful when multiple tools are requested across different MCP Servers.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setMcpServerUrls

Automatically populated reference to MCP Server. Helpful when multiple tools are requested across different MCP Servers.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getInputSchema

A JSON Schema object defining the expected parameters for invoking the tool.

Returns
Type Description
Google\Protobuf\Struct|null

hasInputSchema

clearInputSchema

setInputSchema

A JSON Schema object defining the expected parameters for invoking the tool.

Parameter
Name Description
var Google\Protobuf\Struct
Returns
Type Description
$this

getOutputSchema

Optional. A JSON Schema object defining the expected structure of the tool's output.

Returns
Type Description
Google\Protobuf\Struct|null

hasOutputSchema

clearOutputSchema

setOutputSchema

Optional. A JSON Schema object defining the expected structure of the tool's output.

Parameter
Name Description
var Google\Protobuf\Struct
Returns
Type Description
$this

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.
Returns
Type Description
Google\Protobuf\Struct|null

hasAnnotations

clearAnnotations

setAnnotations

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.
Parameter
Name Description
var Google\Protobuf\Struct
Returns
Type Description
$this