Class: OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools

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

Defined Under Namespace

Classes: Agent, Tool

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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(input_schema:, name:, annotations: nil, description: nil) ⇒ Object

A tool available on an MCP server.

Parameters:

  • input_schema (Object) —

    The JSON schema describing the tool's input.

  • name (String) —

    The name of the tool.

  • annotations (Object, nil) (defaults to: nil) —

    Additional annotations about the tool.

  • description (String, nil) (defaults to: nil) —

    The description of the tool.



# File 'lib/openai/models/beta/beta_response_output_item.rb', line 1538

Instance Attribute Details

#agent ⇒ OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools::Agent?

The agent that produced this item.



1485
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 1485

optional :agent, -> { OpenAI::Beta::BetaResponseOutputItem::McpListTools::Agent }, nil?: true

#error ⇒ String?

Error message if the server could not list tools.

Returns:

  • (String, nil)


1491
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 1491

optional :error, String, nil?: true

#id ⇒ String

The unique ID of the list.

Returns:

  • (String)


1458
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 1458

required :id, String

#server_label ⇒ String

The label of the MCP server.

Returns:

  • (String)


1464
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 1464

required :server_label, String

#tools ⇒ Array<OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools::Tool>

The tools available on the server.



1470
1471
1472
1473
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 1470

required(
  :tools,
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::BetaResponseOutputItem::McpListTools::Tool] }
)

#type ⇒ Symbol, :mcp_list_tools

The type of the item. Always mcp_list_tools.

Returns:

  • (Symbol, :mcp_list_tools)


1479
# File 'lib/openai/models/beta/beta_response_output_item.rb', line 1479

required :type, const: :mcp_list_tools