Class: Google::Apis::CesV1::Tool

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

Overview

A tool represents an action that the CES agent can take to achieve certain goals.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Tool

Returns a new instance of Tool.



8003
8004
8005
# File 'lib/google/apis/ces_v1/classes.rb', line 8003

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

Instance Attribute Details

#agent_toolGoogle::Apis::CesV1::AgentTool

Represents a tool that allows the agent to call another agent. Corresponds to the JSON property agentTool



7876
7877
7878
# File 'lib/google/apis/ces_v1/classes.rb', line 7876

def agent_tool
  @agent_tool
end

#client_functionGoogle::Apis::CesV1::ClientFunction

Represents a client-side function that the agent can invoke. When the tool is chosen by the agent, control is handed off to the client. The client is responsible for executing the function and returning the result as a ToolResponse to continue the interaction with the agent. Corresponds to the JSON property clientFunction



7884
7885
7886
# File 'lib/google/apis/ces_v1/classes.rb', line 7884

def client_function
  @client_function
end

#connector_toolGoogle::Apis::CesV1::ConnectorTool

A ConnectorTool allows connections to different integrations. See: https:// cloud.google.com/integration-connectors/docs/overview. Corresponds to the JSON property connectorTool



7890
7891
7892
# File 'lib/google/apis/ces_v1/classes.rb', line 7890

def connector_tool
  @connector_tool
end

#create_timeString

Output only. Timestamp when the tool was created. Corresponds to the JSON property createTime

Returns:

  • (String)


7895
7896
7897
# File 'lib/google/apis/ces_v1/classes.rb', line 7895

def create_time
  @create_time
end

#data_store_toolGoogle::Apis::CesV1::DataStoreTool

Tool to retrieve from Vertex AI Search datastore or engine for grounding. Accepts either a datastore or an engine, but not both. See Vertex AI Search: https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search- introduction. Corresponds to the JSON property dataStoreTool



7903
7904
7905
# File 'lib/google/apis/ces_v1/classes.rb', line 7903

def data_store_tool
  @data_store_tool
end

#display_nameString

Output only. The display name of the tool, derived based on the tool's type. For example, display name of a ClientFunction is derived from its name property. Corresponds to the JSON property displayName

Returns:

  • (String)


7910
7911
7912
# File 'lib/google/apis/ces_v1/classes.rb', line 7910

def display_name
  @display_name
end

#etagString

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes. Corresponds to the JSON property etag

Returns:

  • (String)


7917
7918
7919
# File 'lib/google/apis/ces_v1/classes.rb', line 7917

def etag
  @etag
end

#execution_typeString

Optional. The execution type of the tool. Corresponds to the JSON property executionType

Returns:

  • (String)


7922
7923
7924
# File 'lib/google/apis/ces_v1/classes.rb', line 7922

def execution_type
  @execution_type
end

#file_search_toolGoogle::Apis::CesV1::FileSearchTool

The file search tool allows the agent to search across the files uploaded by the app/agent developer. It has presets to give relatively good quality search over the uploaded files and summarization of the retrieved results. Corresponds to the JSON property fileSearchTool



7929
7930
7931
# File 'lib/google/apis/ces_v1/classes.rb', line 7929

def file_search_tool
  @file_search_tool
end

#generated_summaryString

Output only. If the tool is generated by the LLM assistant, this field contains a descriptive summary of the generation. Corresponds to the JSON property generatedSummary

Returns:

  • (String)


7935
7936
7937
# File 'lib/google/apis/ces_v1/classes.rb', line 7935

def generated_summary
  @generated_summary
end

#google_search_toolGoogle::Apis::CesV1::GoogleSearchTool

Represents a tool to perform Google web searches for grounding. See https:// cloud.google.com/customer-engagement-ai/conversational-agents/ps/tool#google- search. Corresponds to the JSON property googleSearchTool



7942
7943
7944
# File 'lib/google/apis/ces_v1/classes.rb', line 7942

def google_search_tool
  @google_search_tool
end

#mcp_toolGoogle::Apis::CesV1::McpTool

An MCP tool. See https://modelcontextprotocol.io/specification/2025-06-18/ server/tools for more details. Corresponds to the JSON property mcpTool



7948
7949
7950
# File 'lib/google/apis/ces_v1/classes.rb', line 7948

def mcp_tool
  @mcp_tool
end

#nameString

Identifier. The resource name of the tool. Format: * projects/project/ locations/location/apps/app/tools/toolfor standalone tools. * ` projects/`project`/locations/`location`/apps/`app`/toolsets/`toolset`/tools/` tool for tools retrieved from a toolset. These tools are dynamic and output- only; they cannot be referenced directly where a tool is expected. Corresponds to the JSON property name

Returns:

  • (String)


7957
7958
7959
# File 'lib/google/apis/ces_v1/classes.rb', line 7957

def name
  @name
end

#open_api_toolGoogle::Apis::CesV1::OpenApiTool

A remote API tool defined by an OpenAPI schema. Corresponds to the JSON property openApiTool



7962
7963
7964
# File 'lib/google/apis/ces_v1/classes.rb', line 7962

def open_api_tool
  @open_api_tool
end

#python_functionGoogle::Apis::CesV1::PythonFunction

A Python function tool. Corresponds to the JSON property pythonFunction



7967
7968
7969
# File 'lib/google/apis/ces_v1/classes.rb', line 7967

def python_function
  @python_function
end

#remote_agent_toolGoogle::Apis::CesV1::RemoteAgentTool

Represents a tool that allows the agent to call another remote agent. Corresponds to the JSON property remoteAgentTool



7972
7973
7974
# File 'lib/google/apis/ces_v1/classes.rb', line 7972

def remote_agent_tool
  @remote_agent_tool
end

#system_toolGoogle::Apis::CesV1::SystemTool

Pre-defined system tool. Corresponds to the JSON property systemTool



7977
7978
7979
# File 'lib/google/apis/ces_v1/classes.rb', line 7977

def system_tool
  @system_tool
end

#timeoutString

Optional. The timeout for the tool execution. If not set, the default timeout is 30 seconds for SYNCHRONOUS tools and 60 seconds for ASYNCHRONOUS tools. Corresponds to the JSON property timeout

Returns:

  • (String)


7983
7984
7985
# File 'lib/google/apis/ces_v1/classes.rb', line 7983

def timeout
  @timeout
end

#tool_fake_configGoogle::Apis::CesV1::ToolFakeConfig

Configuration for tool behavior in fake mode. Corresponds to the JSON property toolFakeConfig



7988
7989
7990
# File 'lib/google/apis/ces_v1/classes.rb', line 7988

def tool_fake_config
  @tool_fake_config
end

#update_timeString

Output only. Timestamp when the tool was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


7993
7994
7995
# File 'lib/google/apis/ces_v1/classes.rb', line 7993

def update_time
  @update_time
end

#widget_toolGoogle::Apis::CesV1::WidgetTool

Represents a widget tool that the agent can invoke. When the tool is chosen by the agent, agent will return the widget to the client. The client is responsible for processing the widget and generating the next user query to continue the interaction with the agent. Corresponds to the JSON property widgetTool



8001
8002
8003
# File 'lib/google/apis/ces_v1/classes.rb', line 8001

def widget_tool
  @widget_tool
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
# File 'lib/google/apis/ces_v1/classes.rb', line 8008

def update!(**args)
  @agent_tool = args[:agent_tool] if args.key?(:agent_tool)
  @client_function = args[:client_function] if args.key?(:client_function)
  @connector_tool = args[:connector_tool] if args.key?(:connector_tool)
  @create_time = args[:create_time] if args.key?(:create_time)
  @data_store_tool = args[:data_store_tool] if args.key?(:data_store_tool)
  @display_name = args[:display_name] if args.key?(:display_name)
  @etag = args[:etag] if args.key?(:etag)
  @execution_type = args[:execution_type] if args.key?(:execution_type)
  @file_search_tool = args[:file_search_tool] if args.key?(:file_search_tool)
  @generated_summary = args[:generated_summary] if args.key?(:generated_summary)
  @google_search_tool = args[:google_search_tool] if args.key?(:google_search_tool)
  @mcp_tool = args[:mcp_tool] if args.key?(:mcp_tool)
  @name = args[:name] if args.key?(:name)
  @open_api_tool = args[:open_api_tool] if args.key?(:open_api_tool)
  @python_function = args[:python_function] if args.key?(:python_function)
  @remote_agent_tool = args[:remote_agent_tool] if args.key?(:remote_agent_tool)
  @system_tool = args[:system_tool] if args.key?(:system_tool)
  @timeout = args[:timeout] if args.key?(:timeout)
  @tool_fake_config = args[:tool_fake_config] if args.key?(:tool_fake_config)
  @update_time = args[:update_time] if args.key?(:update_time)
  @widget_tool = args[:widget_tool] if args.key?(:widget_tool)
end