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

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_input_item.rb

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

Some parameter documentations has been truncated, see OpenAI::Models::Responses::ResponseInputItem::McpListTools for more details.

A list of tools available on an MCP server.

Parameters:

  • id (String)

    The unique ID of the list.

  • server_label (String)

    The label of the MCP server.

  • tools (Array<OpenAI::Models::Responses::ResponseInputItem::McpListTools::Tool>)

    The tools available on the server.

  • error (String, nil) (defaults to: nil)

    Error message if the server could not list tools.

  • type (Symbol, :mcp_list_tools) (defaults to: :mcp_list_tools)

    The type of the item. Always ‘mcp_list_tools`.



1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
# File 'lib/openai/models/responses/response_input_item.rb', line 1043

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)
  #   Some parameter documentations has been truncated, see
  #   {OpenAI::Models::Responses::ResponseInputItem::McpListTools::Tool} for more
  #   details.
  #
  #   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

#annotationsObject?

Additional annotations about the tool.

Returns:

  • (Object, nil)


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

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

#descriptionString?

The description of the tool.

Returns:

  • (String, nil)


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

optional :description, String, nil?: true

#input_schemaObject

The JSON schema describing the tool’s input.

Returns:

  • (Object)


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

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

#nameString

The name of the tool.

Returns:

  • (String)


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

required :name, String