Class: OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp

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



66
# File 'sig/openai/models/realtime/realtime_tools_config_union.rbs', line 66

def initialize: (

Instance Attribute Details

#allowed_callersArray<Symbol, OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::AllowedCaller>?

The tool invocation context(s).

Parameters:

  • value (::Array[OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::allowed_caller], nil)

Returns:



37
38
39
40
41
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 37

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

#allowed_toolsArray<String>, ...

List of allowed tool names or a filter object.

Parameters:

  • value (OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::allowed_tools, nil)

Returns:



47
48
49
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 47

optional :allowed_tools,
union: -> { OpenAI::Realtime::RealtimeToolsConfigUnion::Mcp::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)


57
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 57

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


77
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 77

optional :connector_id, enum: -> { OpenAI::Realtime::RealtimeToolsConfigUnion::Mcp::ConnectorID }

#defer_loadingBoolean?

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

Parameters:

Returns:



83
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 83

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)


90
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 90

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

#require_approvalOpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval::McpToolApprovalFilter, ...

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



96
97
98
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 96

optional :require_approval,
union: -> { OpenAI::Realtime::RealtimeToolsConfigUnion::Mcp::RequireApproval },
nil?: true

#server_descriptionString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


104
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 104

optional :server_description, String

#server_labelString

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

Parameters:

  • value (String)

Returns:

  • (String)


25
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 25

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)


111
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 111

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)


118
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 118

optional :tunnel_id, String

#typeSymbol, :mcp

The type of the MCP tool. Always mcp.

Parameters:

  • value (:mcp)

Returns:

  • (Symbol, :mcp)


31
# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 31

required :type, const: :mcp

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/realtime/realtime_tools_config_union.rb', line 158

Instance Method Details

#to_hash{

Returns:

  • ({)


81
# File 'sig/openai/models/realtime/realtime_tools_config_union.rbs', line 81

def to_hash: -> {