Class: OpenAI::Models::Responses::Tool::Mcp
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Responses::Tool::Mcp
- Defined in:
- lib/openai/models/responses/tool.rb,
sig/openai/models/responses/tool.rbs
Defined Under Namespace
Modules: AllowedCaller, AllowedTools, ConnectorID, RequireApproval
Instance Attribute Summary collapse
-
#allowed_callers ⇒ Array<Symbol, OpenAI::Models::Responses::Tool::Mcp::AllowedCaller>?
The tool invocation context(s).
-
#allowed_tools ⇒ Array<String>, ...
List of allowed tool names or a filter object.
-
#authorization ⇒ String?
An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector.
-
#connector_id ⇒ Symbol, ...
Identifier for service connectors, like those available in ChatGPT.
-
#defer_loading ⇒ Boolean?
Whether this MCP tool is deferred and discovered via tool search.
-
#headers ⇒ Hash{Symbol=>String}?
Optional HTTP headers to send to the MCP server.
-
#require_approval ⇒ OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter, ...
Specify which of the MCP server's tools require approval.
-
#server_description ⇒ String?
Optional description of the MCP server, used to provide more context.
-
#server_label ⇒ String
A label for this MCP server, used to identify it in tool calls.
-
#server_url ⇒ String?
The URL for the MCP server.
-
#tunnel_id ⇒ String?
The Secure MCP Tunnel ID to use instead of a direct server URL.
-
#type ⇒ Symbol, :mcp
The type of the MCP tool.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize ⇒ Object constructor
- #to_hash ⇒ {
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 ⇒ Object
80 |
# File 'sig/openai/models/responses/tool.rbs', line 80
def initialize: (
|
Instance Attribute Details
#allowed_callers ⇒ Array<Symbol, OpenAI::Models::Responses::Tool::Mcp::AllowedCaller>?
The tool invocation context(s).
80 81 82 |
# File 'lib/openai/models/responses/tool.rb', line 80 optional :allowed_callers, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Responses::Tool::Mcp::AllowedCaller] }, nil?: true |
#allowed_tools ⇒ Array<String>, ...
List of allowed tool names or a filter object.
88 |
# File 'lib/openai/models/responses/tool.rb', line 88 optional :allowed_tools, union: -> { OpenAI::Responses::Tool::Mcp::AllowedTools }, nil?: true |
#authorization ⇒ String?
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.
96 |
# File 'lib/openai/models/responses/tool.rb', line 96 optional :authorization, String |
#connector_id ⇒ Symbol, ...
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
116 |
# File 'lib/openai/models/responses/tool.rb', line 116 optional :connector_id, enum: -> { OpenAI::Responses::Tool::Mcp::ConnectorID } |
#defer_loading ⇒ Boolean?
Whether this MCP tool is deferred and discovered via tool search.
122 |
# File 'lib/openai/models/responses/tool.rb', line 122 optional :defer_loading, OpenAI::Internal::Type::Boolean |
#headers ⇒ Hash{Symbol=>String}?
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
129 |
# File 'lib/openai/models/responses/tool.rb', line 129 optional :headers, OpenAI::Internal::Type::HashOf[String], nil?: true |
#require_approval ⇒ OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter, ...
Specify which of the MCP server's tools require approval.
135 |
# File 'lib/openai/models/responses/tool.rb', line 135 optional :require_approval, union: -> { OpenAI::Responses::Tool::Mcp::RequireApproval }, nil?: true |
#server_description ⇒ String?
Optional description of the MCP server, used to provide more context.
141 |
# File 'lib/openai/models/responses/tool.rb', line 141 optional :server_description, String |
#server_label ⇒ String
A label for this MCP server, used to identify it in tool calls.
68 |
# File 'lib/openai/models/responses/tool.rb', line 68 required :server_label, String |
#server_url ⇒ String?
The URL for the MCP server. One of server_url, connector_id, or tunnel_id
must be provided.
148 |
# File 'lib/openai/models/responses/tool.rb', line 148 optional :server_url, String |
#tunnel_id ⇒ String?
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.
155 |
# File 'lib/openai/models/responses/tool.rb', line 155 optional :tunnel_id, String |
#type ⇒ Symbol, :mcp
The type of the MCP tool. Always mcp.
74 |
# File 'lib/openai/models/responses/tool.rb', line 74 required :type, const: :mcp |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/responses/tool.rb', line 195
|
Instance Method Details
#to_hash ⇒ {
95 |
# File 'sig/openai/models/responses/tool.rbs', line 95
def to_hash: -> {
|