Class: OpenAI::Models::Responses::ResponseItem::McpListTools

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_item.rb,
sig/openai/models/responses/response_item.rbs

Defined Under Namespace

Classes: Tool

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

#initializeObject



380
# File 'sig/openai/models/responses/response_item.rbs', line 380

def initialize: (

Instance Attribute Details

#errorString?

Error message if the server could not list tools.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


511
# File 'lib/openai/models/responses/response_item.rb', line 511

optional :error, String, nil?: true

#idString

The unique ID of the list.

Parameters:

  • value (String)

Returns:

  • (String)


486
# File 'lib/openai/models/responses/response_item.rb', line 486

required :id, String

#server_labelString

The label of the MCP server.

Parameters:

  • value (String)

Returns:

  • (String)


492
# File 'lib/openai/models/responses/response_item.rb', line 492

required :server_label, String

#toolsArray<OpenAI::Models::Responses::ResponseItem::McpListTools::Tool>

The tools available on the server.

Parameters:

  • value (::Array[OpenAI::Responses::ResponseItem::McpListTools::Tool])

Returns:



498
499
# File 'lib/openai/models/responses/response_item.rb', line 498

required :tools,
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::ResponseItem::McpListTools::Tool] }

#typeSymbol, :mcp_list_tools

The type of the item. Always mcp_list_tools.

Parameters:

  • value (:mcp_list_tools)

Returns:

  • (Symbol, :mcp_list_tools)


505
# File 'lib/openai/models/responses/response_item.rb', line 505

required :type, const: :mcp_list_tools

Instance Method Details

#to_hash{

Returns:

  • ({)


388
# File 'sig/openai/models/responses/response_item.rbs', line 388

def to_hash: -> {