Class McpServer.Tool.Builder (0.2.0)

public static final class McpServer.Tool.Builder extends GeneratedMessage.Builder<McpServer.Tool.Builder> implements McpServer.ToolOrBuilder

Represents a single tool provided by an MCP Server.

Protobuf type google.cloud.agentregistry.v1.McpServer.Tool

Static Methods

getDescriptor()

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

Methods

build()

public McpServer.Tool build()
Returns
Type Description
McpServer.Tool

buildPartial()

public McpServer.Tool buildPartial()
Returns
Type Description
McpServer.Tool

clear()

public McpServer.Tool.Builder clear()
Returns
Type Description
McpServer.Tool.Builder
Overrides

clearAnnotations()

public McpServer.Tool.Builder clearAnnotations()

Output only. Annotations associated with the tool.

.google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
McpServer.Tool.Builder

clearDescription()

public McpServer.Tool.Builder clearDescription()

Output only. Description of what the tool does.

string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
McpServer.Tool.Builder

This builder for chaining.

clearName()

public McpServer.Tool.Builder clearName()

Output only. Human-readable name of the tool.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
McpServer.Tool.Builder

This builder for chaining.

getAnnotations()

public McpServer.Tool.Annotations getAnnotations()

Output only. Annotations associated with the tool.

.google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
McpServer.Tool.Annotations

The annotations.

getAnnotationsBuilder()

public McpServer.Tool.Annotations.Builder getAnnotationsBuilder()

Output only. Annotations associated with the tool.

.google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
McpServer.Tool.Annotations.Builder

getAnnotationsOrBuilder()

public McpServer.Tool.AnnotationsOrBuilder getAnnotationsOrBuilder()

Output only. Annotations associated with the tool.

.google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
McpServer.Tool.AnnotationsOrBuilder

getDefaultInstanceForType()

public McpServer.Tool getDefaultInstanceForType()
Returns
Type Description
McpServer.Tool

getDescription()

public String getDescription()

Output only. Description of what the tool does.

string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Output only. Description of what the tool does.

string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getName()

public String getName()

Output only. Human-readable name of the tool.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Human-readable name of the tool.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

hasAnnotations()

public boolean hasAnnotations()

Output only. Annotations associated with the tool.

.google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the annotations field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAnnotations(McpServer.Tool.Annotations value)

public McpServer.Tool.Builder mergeAnnotations(McpServer.Tool.Annotations value)

Output only. Annotations associated with the tool.

.google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value McpServer.Tool.Annotations
Returns
Type Description
McpServer.Tool.Builder

mergeFrom(McpServer.Tool other)

public McpServer.Tool.Builder mergeFrom(McpServer.Tool other)
Parameter
Name Description
other McpServer.Tool
Returns
Type Description
McpServer.Tool.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public McpServer.Tool.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
McpServer.Tool.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public McpServer.Tool.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
McpServer.Tool.Builder
Overrides

setAnnotations(McpServer.Tool.Annotations value)

public McpServer.Tool.Builder setAnnotations(McpServer.Tool.Annotations value)

Output only. Annotations associated with the tool.

.google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value McpServer.Tool.Annotations
Returns
Type Description
McpServer.Tool.Builder

setAnnotations(McpServer.Tool.Annotations.Builder builderForValue)

public McpServer.Tool.Builder setAnnotations(McpServer.Tool.Annotations.Builder builderForValue)

Output only. Annotations associated with the tool.

.google.cloud.agentregistry.v1.McpServer.Tool.Annotations annotations = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue McpServer.Tool.Annotations.Builder
Returns
Type Description
McpServer.Tool.Builder

setDescription(String value)

public McpServer.Tool.Builder setDescription(String value)

Output only. Description of what the tool does.

string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
McpServer.Tool.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public McpServer.Tool.Builder setDescriptionBytes(ByteString value)

Output only. Description of what the tool does.

string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
McpServer.Tool.Builder

This builder for chaining.

setName(String value)

public McpServer.Tool.Builder setName(String value)

Output only. Human-readable name of the tool.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
McpServer.Tool.Builder

This builder for chaining.

setNameBytes(ByteString value)

public McpServer.Tool.Builder setNameBytes(ByteString value)

Output only. Human-readable name of the tool.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
McpServer.Tool.Builder

This builder for chaining.