Class: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool

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

Defined Under Namespace

Modules: AllowedCaller, AllowedTools, ConnectorID, RequireApproval

Instance Attribute Summary collapse

Class Method 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

#initializeObject



567
# File 'sig/openai/models/realtime/realtime_session_create_response.rbs', line 567

def initialize: (

Instance Attribute Details

#allowed_callersArray<Symbol, OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::AllowedCaller>?

The tool invocation context(s).

Parameters:

  • value (::Array[OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::allowed_caller], nil)

Returns:



753
754
755
756
757
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 753

optional :allowed_callers,
-> {
  OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::AllowedCaller]
},
nil?: true

#allowed_toolsArray<String>, ...

List of allowed tool names or a filter object.

Parameters:

  • value (OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::allowed_tools, nil)

Returns:



763
764
765
766
767
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 763

optional :allowed_tools,
union: -> {
  OpenAI::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::AllowedTools
},
nil?: true

#authorizationString?

An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.

Parameters:

  • (String)

Returns:

  • (String, nil)


775
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 775

optional :authorization, String

#connector_idSymbol, ...

Identifier for service connectors, like those available in ChatGPT. One of server_url, connector_id, or tunnel_id must be provided. Learn more about service connectors here.

Currently supported connector_id values are:

  • Dropbox: connector_dropbox
  • Gmail: connector_gmail
  • Google Calendar: connector_googlecalendar
  • Google Drive: connector_googledrive
  • Microsoft Teams: connector_microsoftteams
  • Outlook Calendar: connector_outlookcalendar
  • Outlook Email: connector_outlookemail
  • SharePoint: connector_sharepoint


795
796
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 795

optional :connector_id,
enum: -> { OpenAI::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::ConnectorID }

#defer_loadingBoolean?

Whether this MCP tool is deferred and discovered via tool search.

Parameters:

Returns:



802
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 802

optional :defer_loading, OpenAI::Internal::Type::Boolean

#headersHash{Symbol=>String}?

Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.

Parameters:

  • value (::Hash[Symbol, String], nil)

Returns:

  • (Hash{Symbol=>String}, nil)


809
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 809

optional :headers, OpenAI::Internal::Type::HashOf[String], nil?: true

#require_approvalOpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::McpToolApprovalFilter, ...

Specify which of the MCP server's tools require approval.



815
816
817
818
819
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 815

optional :require_approval,
union: -> {
  OpenAI::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval
},
nil?: true

#server_descriptionString?

Optional description of the MCP server, used to provide more context.

Parameters:

  • (String)

Returns:

  • (String, nil)


825
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 825

optional :server_description, String

#server_labelString

A label for this MCP server, used to identify it in tool calls.

Parameters:

  • value (String)

Returns:

  • (String)


741
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 741

required :server_label, String

#server_urlString?

The URL for the MCP server. One of server_url, connector_id, or tunnel_id must be provided.

Parameters:

  • (String)

Returns:

  • (String, nil)


832
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 832

optional :server_url, String

#tunnel_idString?

The Secure MCP Tunnel ID to use instead of a direct server URL. One of server_url, connector_id, or tunnel_id must be provided.

Parameters:

  • (String)

Returns:

  • (String, nil)


839
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 839

optional :tunnel_id, String

#typeSymbol, :mcp

The type of the MCP tool. Always mcp.

Parameters:

  • value (:mcp)

Returns:

  • (Symbol, :mcp)


747
# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 747

required :type, const: :mcp

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/realtime/realtime_session_create_response.rb', line 880

Instance Method Details

#to_hash{

Returns:

  • ({)


582
# File 'sig/openai/models/realtime/realtime_session_create_response.rbs', line 582

def to_hash: -> {