1515 "Tool" ,
1616 "Mcp" ,
1717 "McpAllowedTools" ,
18- "McpAllowedToolsMcpAllowedToolsFilter " ,
18+ "McpAllowedToolsMcpToolFilter " ,
1919 "McpRequireApproval" ,
2020 "McpRequireApprovalMcpToolApprovalFilter" ,
2121 "McpRequireApprovalMcpToolApprovalFilterAlways" ,
2929]
3030
3131
32- class McpAllowedToolsMcpAllowedToolsFilter (BaseModel ):
32+ class McpAllowedToolsMcpToolFilter (BaseModel ):
33+ read_only : Optional [bool ] = None
34+ """Indicates whether or not a tool modifies data or is read-only.
35+
36+ If an MCP server is
37+ [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
38+ it will match this filter.
39+ """
40+
3341 tool_names : Optional [List [str ]] = None
3442 """List of allowed tool names."""
3543
3644
37- McpAllowedTools : TypeAlias = Union [List [str ], McpAllowedToolsMcpAllowedToolsFilter , None ]
45+ McpAllowedTools : TypeAlias = Union [List [str ], McpAllowedToolsMcpToolFilter , None ]
3846
3947
4048class McpRequireApprovalMcpToolApprovalFilterAlways (BaseModel ):
49+ read_only : Optional [bool ] = None
50+ """Indicates whether or not a tool modifies data or is read-only.
51+
52+ If an MCP server is
53+ [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
54+ it will match this filter.
55+ """
56+
4157 tool_names : Optional [List [str ]] = None
42- """List of tools that require approval ."""
58+ """List of allowed tool names ."""
4359
4460
4561class McpRequireApprovalMcpToolApprovalFilterNever (BaseModel ):
62+ read_only : Optional [bool ] = None
63+ """Indicates whether or not a tool modifies data or is read-only.
64+
65+ If an MCP server is
66+ [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
67+ it will match this filter.
68+ """
69+
4670 tool_names : Optional [List [str ]] = None
47- """List of tools that do not require approval ."""
71+ """List of allowed tool names ."""
4872
4973
5074class McpRequireApprovalMcpToolApprovalFilter (BaseModel ):
5175 always : Optional [McpRequireApprovalMcpToolApprovalFilterAlways ] = None
52- """A list of tools that always require approval ."""
76+ """A filter object to specify which tools are allowed ."""
5377
5478 never : Optional [McpRequireApprovalMcpToolApprovalFilterNever ] = None
55- """A list of tools that never require approval ."""
79+ """A filter object to specify which tools are allowed ."""
5680
5781
5882McpRequireApproval : TypeAlias = Union [McpRequireApprovalMcpToolApprovalFilter , Literal ["always" , "never" ], None ]
@@ -62,15 +86,49 @@ class Mcp(BaseModel):
6286 server_label : str
6387 """A label for this MCP server, used to identify it in tool calls."""
6488
65- server_url : str
66- """The URL for the MCP server."""
67-
6889 type : Literal ["mcp" ]
6990 """The type of the MCP tool. Always `mcp`."""
7091
7192 allowed_tools : Optional [McpAllowedTools ] = None
7293 """List of allowed tool names or a filter object."""
7394
95+ authorization : Optional [str ] = None
96+ """
97+ An OAuth access token that can be used with a remote MCP server, either with a
98+ custom MCP server URL or a service connector. Your application must handle the
99+ OAuth authorization flow and provide the token here.
100+ """
101+
102+ connector_id : Optional [
103+ Literal [
104+ "connector_dropbox" ,
105+ "connector_gmail" ,
106+ "connector_googlecalendar" ,
107+ "connector_googledrive" ,
108+ "connector_microsoftteams" ,
109+ "connector_outlookcalendar" ,
110+ "connector_outlookemail" ,
111+ "connector_sharepoint" ,
112+ ]
113+ ] = None
114+ """Identifier for service connectors, like those available in ChatGPT.
115+
116+ One of `server_url` or `connector_id` must be provided. Learn more about service
117+ connectors
118+ [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
119+
120+ Currently supported `connector_id` values are:
121+
122+ - Dropbox: `connector_dropbox`
123+ - Gmail: `connector_gmail`
124+ - Google Calendar: `connector_googlecalendar`
125+ - Google Drive: `connector_googledrive`
126+ - Microsoft Teams: `connector_microsoftteams`
127+ - Outlook Calendar: `connector_outlookcalendar`
128+ - Outlook Email: `connector_outlookemail`
129+ - SharePoint: `connector_sharepoint`
130+ """
131+
74132 headers : Optional [Dict [str , str ]] = None
75133 """Optional HTTP headers to send to the MCP server.
76134
@@ -83,6 +141,12 @@ class Mcp(BaseModel):
83141 server_description : Optional [str ] = None
84142 """Optional description of the MCP server, used to provide more context."""
85143
144+ server_url : Optional [str ] = None
145+ """The URL for the MCP server.
146+
147+ One of `server_url` or `connector_id` must be provided.
148+ """
149+
86150
87151class CodeInterpreterContainerCodeInterpreterToolAuto (BaseModel ):
88152 type : Literal ["auto" ]
0 commit comments