Class: OpenAI::Models::Beta::BetaResponseItem::McpListTools::Tool

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/beta_response_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, server_label:, tools:, agent: nil, error: nil, type: :mcp_list_tools) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Beta::BetaResponseItem::McpListTools for more details.

A list of tools available on an MCP server.

Parameters:



1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
# File 'lib/openai/models/beta/beta_response_item.rb', line 1114

class Tool < OpenAI::Internal::Type::BaseModel
  # @!attribute input_schema
  #   The JSON schema describing the tool's input.
  #
  #   @return [Object]
  required :input_schema, OpenAI::Internal::Type::Unknown

  # @!attribute name
  #   The name of the tool.
  #
  #   @return [String]
  required :name, String

  # @!attribute annotations
  #   Additional annotations about the tool.
  #
  #   @return [Object, nil]
  optional :annotations, OpenAI::Internal::Type::Unknown, nil?: true

  # @!attribute description
  #   The description of the tool.
  #
  #   @return [String, nil]
  optional :description, String, nil?: true

  # @!method initialize(input_schema:, name:, annotations: nil, description: nil)
  #   Some parameter documentations has been truncated, see
  #   {OpenAI::Models::Beta::BetaResponseItem::McpListTools::Tool} for more details.
  #
  #   A tool available on an MCP server.
  #
  #   @param input_schema [Object] The JSON schema describing the tool's input.
  #
  #   @param name [String] The name of the tool.
  #
  #   @param annotations [Object, nil] Additional annotations about the tool.
  #
  #   @param description [String, nil] The description of the tool.
end

Instance Attribute Details

#annotationsObject?

Additional annotations about the tool.

Returns:

  • (Object, nil)


1131
# File 'lib/openai/models/beta/beta_response_item.rb', line 1131

optional :annotations, OpenAI::Internal::Type::Unknown, nil?: true

#descriptionString?

The description of the tool.

Returns:

  • (String, nil)


1137
# File 'lib/openai/models/beta/beta_response_item.rb', line 1137

optional :description, String, nil?: true

#input_schemaObject

The JSON schema describing the tool's input.

Returns:

  • (Object)


1119
# File 'lib/openai/models/beta/beta_response_item.rb', line 1119

required :input_schema, OpenAI::Internal::Type::Unknown

#nameString

The name of the tool.

Returns:

  • (String)


1125
# File 'lib/openai/models/beta/beta_response_item.rb', line 1125

required :name, String