Class: OpenAI::Models::Realtime::RealtimeMcpListTools::Tool

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/realtime_mcp_list_tools.rb,
sig/openai/models/realtime/realtime_mcp_list_tools.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(input_schema:, name:, annotations: nil, description: nil) ⇒ Object

Parameters:

  • input_schema

    The JSON schema describing the tool's input.

  • name

    The name of the tool.

  • annotations (defaults to: nil)

    Additional annotations about the tool.

  • description (defaults to: nil)

    The description of the tool.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/openai/models/realtime/realtime_mcp_list_tools.rb', line 45

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

#annotationstop?

Additional annotations about the tool.

Returns:

  • (top, nil)


62
# File 'lib/openai/models/realtime/realtime_mcp_list_tools.rb', line 62

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

#descriptionString?

The description of the tool.

Returns:

  • (String, nil)


68
# File 'lib/openai/models/realtime/realtime_mcp_list_tools.rb', line 68

optional :description, String, nil?: true

#input_schematop

The JSON schema describing the tool's input.

Returns:

  • (top)


50
# File 'lib/openai/models/realtime/realtime_mcp_list_tools.rb', line 50

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

#nameString

The name of the tool.

Returns:

  • (String)


56
# File 'lib/openai/models/realtime/realtime_mcp_list_tools.rb', line 56

required :name, String

Instance Method Details

#to_hash{

Returns:

  • ({)


86
# File 'sig/openai/models/realtime/realtime_mcp_list_tools.rbs', line 86

def to_hash: -> {