Class: Google::Apis::ApihubV1::GoogleCloudApihubV1McpToolConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/apihub_v1/classes.rb,
lib/google/apis/apihub_v1/representations.rb,
lib/google/apis/apihub_v1/representations.rb

Overview

A tool exposed by the MCP server. Each tool wraps exactly one API Hub operation under a caller-supplied identifier.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudApihubV1McpToolConfig

Returns a new instance of GoogleCloudApihubV1McpToolConfig.



3620
3621
3622
# File 'lib/google/apis/apihub_v1/classes.rb', line 3620

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#descriptionString

Required. Description of what the tool does and how it is used. Description serves as key reference for the agent to know about the tool capabilities. Corresponds to the JSON property description

Returns:

  • (String)


3606
3607
3608
# File 'lib/google/apis/apihub_v1/classes.rb', line 3606

def description
  @description
end

#operationGoogle::Apis::ApihubV1::GoogleCloudApihubV1OperationConfig

API hub Operation config. Corresponds to the JSON property operation



3611
3612
3613
# File 'lib/google/apis/apihub_v1/classes.rb', line 3611

def operation
  @operation
end

#tool_idString

Required. Caller-supplied identifier for the tool; each tool must have a unique identifier. This will be by used by agents to invoke the tool. Tool ID must be unique across all tools in the given MCP server configuration. Corresponds to the JSON property toolId

Returns:

  • (String)


3618
3619
3620
# File 'lib/google/apis/apihub_v1/classes.rb', line 3618

def tool_id
  @tool_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3625
3626
3627
3628
3629
# File 'lib/google/apis/apihub_v1/classes.rb', line 3625

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @operation = args[:operation] if args.key?(:operation)
  @tool_id = args[:tool_id] if args.key?(:tool_id)
end