Class: OpenAI::Models::Responses::ResponseInputItem::McpListTools::Tool

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_input_item.rb,
sig/openai/models/responses/response_input_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.



1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
# File 'lib/openai/models/responses/response_input_item.rb', line 1816

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)


1833
# File 'lib/openai/models/responses/response_input_item.rb', line 1833

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

#description ⇒ String?

The description of the tool.

Returns:

  • (String, nil)


1839
# File 'lib/openai/models/responses/response_input_item.rb', line 1839

optional :description, String, nil?: true

#input_schema ⇒ top

The JSON schema describing the tool's input.

Returns:

  • (top)


1821
# File 'lib/openai/models/responses/response_input_item.rb', line 1821

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

#name ⇒ String

The name of the tool.

Returns:

  • (String)


1827
# File 'lib/openai/models/responses/response_input_item.rb', line 1827

required :name, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


1576
# File 'sig/openai/models/responses/response_input_item.rbs', line 1576

def to_hash: -> {