Class: OpenAI::Models::Responses::ResponseOutputItem::McpListTools::Tool

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

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(id:, server_label:, tools:, error: nil, type: :mcp_list_tools) ⇒ Object

Parameters:

  • input_schema —

    The JSON schema describing the tool's input.

  • name —

    The name of the tool.

  • annotations —

    Additional annotations about the tool.

  • description —

    The description of the tool.



838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
# File 'lib/openai/models/responses/response_output_item.rb', line 838

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)
  #   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

#annotations ⇒ top?

Additional annotations about the tool.

Returns:

  • (top, nil)


855
# File 'lib/openai/models/responses/response_output_item.rb', line 855

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

#description ⇒ String?

The description of the tool.

Returns:

  • (String, nil)


861
# File 'lib/openai/models/responses/response_output_item.rb', line 861

optional :description, String, nil?: true

#input_schema ⇒ top

The JSON schema describing the tool's input.

Returns:

  • (top)


843
# File 'lib/openai/models/responses/response_output_item.rb', line 843

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

#name ⇒ String

The name of the tool.

Returns:

  • (String)


849
# File 'lib/openai/models/responses/response_output_item.rb', line 849

required :name, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


769
# File 'sig/openai/models/responses/response_output_item.rbs', line 769

def to_hash: -> {