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

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

Defined Under Namespace

Classes: Agent, 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

#initialize(input_schema:, name:, annotations: nil, description: nil) ⇒ Object

Some parameter documentations has been truncated, see Tool for more details.

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_item.rb', line 1139

Instance Attribute Details

#agentOpenAI::Models::Beta::BetaResponseItem::McpListTools::Agent?

The agent that produced this item.



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

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

#errorString?

Error message if the server could not list tools.

Returns:

  • (String, nil)


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

optional :error, String, nil?: true

#idString

The unique ID of the list.

Returns:

  • (String)


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

required :id, String

#server_labelString

The label of the MCP server.

Returns:

  • (String)


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

required :server_label, String

#toolsArray<OpenAI::Models::Beta::BetaResponseItem::McpListTools::Tool>

The tools available on the server.



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

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

#typeSymbol, :mcp_list_tools

The type of the item. Always mcp_list_tools.

Returns:

  • (Symbol, :mcp_list_tools)


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

required :type, const: :mcp_list_tools