@@ -47,12 +47,6 @@ class Mcp < OpenAI::Internal::Type::BaseModel
4747 # @return [String]
4848 required :server_label , String
4949
50- # @!attribute server_url
51- # The URL for the MCP server.
52- #
53- # @return [String]
54- required :server_url , String
55-
5650 # @!attribute type
5751 # The type of the MCP tool. Always `mcp`.
5852 #
@@ -62,9 +56,37 @@ class Mcp < OpenAI::Internal::Type::BaseModel
6256 # @!attribute allowed_tools
6357 # List of allowed tool names or a filter object.
6458 #
65- # @return [Array<String>, OpenAI::Models::Responses::Tool::Mcp::AllowedTools::McpAllowedToolsFilter , nil]
59+ # @return [Array<String>, OpenAI::Models::Responses::Tool::Mcp::AllowedTools::McpToolFilter , nil]
6660 optional :allowed_tools , union : -> { OpenAI ::Responses ::Tool ::Mcp ::AllowedTools } , nil? : true
6761
62+ # @!attribute authorization
63+ # An OAuth access token that can be used with a remote MCP server, either with a
64+ # custom MCP server URL or a service connector. Your application must handle the
65+ # OAuth authorization flow and provide the token here.
66+ #
67+ # @return [String, nil]
68+ optional :authorization , String
69+
70+ # @!attribute connector_id
71+ # Identifier for service connectors, like those available in ChatGPT. One of
72+ # `server_url` or `connector_id` must be provided. Learn more about service
73+ # connectors
74+ # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
75+ #
76+ # Currently supported `connector_id` values are:
77+ #
78+ # - Dropbox: `connector_dropbox`
79+ # - Gmail: `connector_gmail`
80+ # - Google Calendar: `connector_googlecalendar`
81+ # - Google Drive: `connector_googledrive`
82+ # - Microsoft Teams: `connector_microsoftteams`
83+ # - Outlook Calendar: `connector_outlookcalendar`
84+ # - Outlook Email: `connector_outlookemail`
85+ # - SharePoint: `connector_sharepoint`
86+ #
87+ # @return [Symbol, OpenAI::Models::Responses::Tool::Mcp::ConnectorID, nil]
88+ optional :connector_id , enum : -> { OpenAI ::Responses ::Tool ::Mcp ::ConnectorID }
89+
6890 # @!attribute headers
6991 # Optional HTTP headers to send to the MCP server. Use for authentication or other
7092 # purposes.
@@ -84,7 +106,14 @@ class Mcp < OpenAI::Internal::Type::BaseModel
84106 # @return [String, nil]
85107 optional :server_description , String
86108
87- # @!method initialize(server_label:, server_url:, allowed_tools: nil, headers: nil, require_approval: nil, server_description: nil, type: :mcp)
109+ # @!attribute server_url
110+ # The URL for the MCP server. One of `server_url` or `connector_id` must be
111+ # provided.
112+ #
113+ # @return [String, nil]
114+ optional :server_url , String
115+
116+ # @!method initialize(server_label:, allowed_tools: nil, authorization: nil, connector_id: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, type: :mcp)
88117 # Some parameter documentations has been truncated, see
89118 # {OpenAI::Models::Responses::Tool::Mcp} for more details.
90119 #
@@ -94,16 +123,20 @@ class Mcp < OpenAI::Internal::Type::BaseModel
94123 #
95124 # @param server_label [String] A label for this MCP server, used to identify it in tool calls.
96125 #
97- # @param server_url [String] The URL for the MCP server.
126+ # @param allowed_tools [Array<String>, OpenAI::Models::Responses::Tool::Mcp::AllowedTools::McpToolFilter, nil] List of allowed tool names or a filter object.
127+ #
128+ # @param authorization [String] An OAuth access token that can be used with a remote MCP server, either
98129 #
99- # @param allowed_tools [Array<String> , OpenAI::Models::Responses::Tool::Mcp::AllowedTools::McpAllowedToolsFilter, nil] List of allowed tool names or a filter object.
130+ # @param connector_id [Symbol , OpenAI::Models::Responses::Tool::Mcp::ConnectorID] Identifier for service connectors, like those available in ChatGPT. One of
100131 #
101132 # @param headers [Hash{Symbol=>String}, nil] Optional HTTP headers to send to the MCP server. Use for authentication
102133 #
103134 # @param require_approval [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter, Symbol, OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalSetting, nil] Specify which of the MCP server's tools require approval.
104135 #
105136 # @param server_description [String] Optional description of the MCP server, used to provide more context.
106137 #
138+ # @param server_url [String] The URL for the MCP server. One of `server_url` or `connector_id` must be
139+ #
107140 # @param type [Symbol, :mcp] The type of the MCP tool. Always `mcp`.
108141
109142 # List of allowed tool names or a filter object.
@@ -116,34 +149,85 @@ module AllowedTools
116149 variant -> { OpenAI ::Models ::Responses ::Tool ::Mcp ::AllowedTools ::StringArray }
117150
118151 # A filter object to specify which tools are allowed.
119- variant -> { OpenAI ::Responses ::Tool ::Mcp ::AllowedTools ::McpAllowedToolsFilter }
152+ variant -> { OpenAI ::Responses ::Tool ::Mcp ::AllowedTools ::McpToolFilter }
153+
154+ class McpToolFilter < OpenAI ::Internal ::Type ::BaseModel
155+ # @!attribute read_only
156+ # Indicates whether or not a tool modifies data or is read-only. If an MCP server
157+ # is
158+ # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
159+ # it will match this filter.
160+ #
161+ # @return [Boolean, nil]
162+ optional :read_only , OpenAI ::Internal ::Type ::Boolean
120163
121- class McpAllowedToolsFilter < OpenAI ::Internal ::Type ::BaseModel
122164 # @!attribute tool_names
123165 # List of allowed tool names.
124166 #
125167 # @return [Array<String>, nil]
126168 optional :tool_names , OpenAI ::Internal ::Type ::ArrayOf [ String ]
127169
128- # @!method initialize(tool_names: nil)
170+ # @!method initialize(read_only: nil, tool_names: nil)
171+ # Some parameter documentations has been truncated, see
172+ # {OpenAI::Models::Responses::Tool::Mcp::AllowedTools::McpToolFilter} for more
173+ # details.
174+ #
129175 # A filter object to specify which tools are allowed.
130176 #
177+ # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an
178+ #
131179 # @param tool_names [Array<String>] List of allowed tool names.
132180 end
133181
134182 # @!method self.variants
135- # @return [Array(Array<String>, OpenAI::Models::Responses::Tool::Mcp::AllowedTools::McpAllowedToolsFilter )]
183+ # @return [Array(Array<String>, OpenAI::Models::Responses::Tool::Mcp::AllowedTools::McpToolFilter )]
136184
137185 # @type [OpenAI::Internal::Type::Converter]
138186 StringArray = OpenAI ::Internal ::Type ::ArrayOf [ String ]
139187 end
140188
189+ # Identifier for service connectors, like those available in ChatGPT. One of
190+ # `server_url` or `connector_id` must be provided. Learn more about service
191+ # connectors
192+ # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
193+ #
194+ # Currently supported `connector_id` values are:
195+ #
196+ # - Dropbox: `connector_dropbox`
197+ # - Gmail: `connector_gmail`
198+ # - Google Calendar: `connector_googlecalendar`
199+ # - Google Drive: `connector_googledrive`
200+ # - Microsoft Teams: `connector_microsoftteams`
201+ # - Outlook Calendar: `connector_outlookcalendar`
202+ # - Outlook Email: `connector_outlookemail`
203+ # - SharePoint: `connector_sharepoint`
204+ #
205+ # @see OpenAI::Models::Responses::Tool::Mcp#connector_id
206+ module ConnectorID
207+ extend OpenAI ::Internal ::Type ::Enum
208+
209+ CONNECTOR_DROPBOX = :connector_dropbox
210+ CONNECTOR_GMAIL = :connector_gmail
211+ CONNECTOR_GOOGLECALENDAR = :connector_googlecalendar
212+ CONNECTOR_GOOGLEDRIVE = :connector_googledrive
213+ CONNECTOR_MICROSOFTTEAMS = :connector_microsoftteams
214+ CONNECTOR_OUTLOOKCALENDAR = :connector_outlookcalendar
215+ CONNECTOR_OUTLOOKEMAIL = :connector_outlookemail
216+ CONNECTOR_SHAREPOINT = :connector_sharepoint
217+
218+ # @!method self.values
219+ # @return [Array<Symbol>]
220+ end
221+
141222 # Specify which of the MCP server's tools require approval.
142223 #
143224 # @see OpenAI::Models::Responses::Tool::Mcp#require_approval
144225 module RequireApproval
145226 extend OpenAI ::Internal ::Type ::Union
146227
228+ # Specify which of the MCP server's tools require approval. Can be
229+ # `always`, `never`, or a filter object associated with tools
230+ # that require approval.
147231 variant -> { OpenAI ::Responses ::Tool ::Mcp ::RequireApproval ::McpToolApprovalFilter }
148232
149233 # Specify a single approval policy for all tools. One of `always` or
@@ -153,13 +237,13 @@ module RequireApproval
153237
154238 class McpToolApprovalFilter < OpenAI ::Internal ::Type ::BaseModel
155239 # @!attribute always
156- # A list of tools that always require approval .
240+ # A filter object to specify which tools are allowed .
157241 #
158242 # @return [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always, nil]
159243 optional :always , -> { OpenAI ::Responses ::Tool ::Mcp ::RequireApproval ::McpToolApprovalFilter ::Always }
160244
161245 # @!attribute never
162- # A list of tools that never require approval .
246+ # A filter object to specify which tools are allowed .
163247 #
164248 # @return [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never, nil]
165249 optional :never , -> { OpenAI ::Responses ::Tool ::Mcp ::RequireApproval ::McpToolApprovalFilter ::Never }
@@ -169,36 +253,69 @@ class McpToolApprovalFilter < OpenAI::Internal::Type::BaseModel
169253 # {OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter}
170254 # for more details.
171255 #
172- # @param always [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always] A list of tools that always require approval.
256+ # Specify which of the MCP server's tools require approval. Can be `always`,
257+ # `never`, or a filter object associated with tools that require approval.
258+ #
259+ # @param always [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always] A filter object to specify which tools are allowed.
173260 #
174- # @param never [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never] A list of tools that never require approval .
261+ # @param never [OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never] A filter object to specify which tools are allowed .
175262
176263 # @see OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter#always
177264 class Always < OpenAI ::Internal ::Type ::BaseModel
265+ # @!attribute read_only
266+ # Indicates whether or not a tool modifies data or is read-only. If an MCP server
267+ # is
268+ # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
269+ # it will match this filter.
270+ #
271+ # @return [Boolean, nil]
272+ optional :read_only , OpenAI ::Internal ::Type ::Boolean
273+
178274 # @!attribute tool_names
179- # List of tools that require approval .
275+ # List of allowed tool names .
180276 #
181277 # @return [Array<String>, nil]
182278 optional :tool_names , OpenAI ::Internal ::Type ::ArrayOf [ String ]
183279
184- # @!method initialize(tool_names: nil)
185- # A list of tools that always require approval.
280+ # @!method initialize(read_only: nil, tool_names: nil)
281+ # Some parameter documentations has been truncated, see
282+ # {OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always}
283+ # for more details.
284+ #
285+ # A filter object to specify which tools are allowed.
186286 #
187- # @param tool_names [Array<String>] List of tools that require approval.
287+ # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an
288+ #
289+ # @param tool_names [Array<String>] List of allowed tool names.
188290 end
189291
190292 # @see OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter#never
191293 class Never < OpenAI ::Internal ::Type ::BaseModel
294+ # @!attribute read_only
295+ # Indicates whether or not a tool modifies data or is read-only. If an MCP server
296+ # is
297+ # [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
298+ # it will match this filter.
299+ #
300+ # @return [Boolean, nil]
301+ optional :read_only , OpenAI ::Internal ::Type ::Boolean
302+
192303 # @!attribute tool_names
193- # List of tools that do not require approval .
304+ # List of allowed tool names .
194305 #
195306 # @return [Array<String>, nil]
196307 optional :tool_names , OpenAI ::Internal ::Type ::ArrayOf [ String ]
197308
198- # @!method initialize(tool_names: nil)
199- # A list of tools that never require approval.
309+ # @!method initialize(read_only: nil, tool_names: nil)
310+ # Some parameter documentations has been truncated, see
311+ # {OpenAI::Models::Responses::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never}
312+ # for more details.
313+ #
314+ # A filter object to specify which tools are allowed.
315+ #
316+ # @param read_only [Boolean] Indicates whether or not a tool modifies data or is read-only. If an
200317 #
201- # @param tool_names [Array<String>] List of tools that do not require approval .
318+ # @param tool_names [Array<String>] List of allowed tool names .
202319 end
203320 end
204321
0 commit comments