Class RealtimeSessionCreateResponse.Tool.McpTool
-
- All Implemented Interfaces:
public final class RealtimeSessionCreateResponse.Tool.McpTool
Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
RealtimeSessionCreateResponse.Tool.McpTool.Builder
A builder for McpTool.
public final class
RealtimeSessionCreateResponse.Tool.McpTool.AllowedTools
List of allowed tool names or a filter object.
public final class
RealtimeSessionCreateResponse.Tool.McpTool.ConnectorId
Identifier for service connectors, like those available in ChatGPT. One of
server_url
orconnector_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
public final class
RealtimeSessionCreateResponse.Tool.McpTool.Headers
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
public final class
RealtimeSessionCreateResponse.Tool.McpTool.RequireApproval
Specify which of the MCP server's tools require approval.
-
Method Summary
-
-
Method Detail
-
serverLabel
final String serverLabel()
A label for this MCP server, used to identify it in tool calls.
-
_type
final JsonValue _type()
The type of the MCP tool. Always
mcp
.Expected to always return the following:
JsonValue.from("mcp")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
allowedTools
final Optional<RealtimeSessionCreateResponse.Tool.McpTool.AllowedTools> allowedTools()
List of allowed tool names or a filter object.
-
authorization
final Optional<String> authorization()
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.
-
connectorId
final Optional<RealtimeSessionCreateResponse.Tool.McpTool.ConnectorId> connectorId()
Identifier for service connectors, like those available in ChatGPT. One of
server_url
orconnector_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
-
headers
final Optional<RealtimeSessionCreateResponse.Tool.McpTool.Headers> headers()
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
-
requireApproval
final Optional<RealtimeSessionCreateResponse.Tool.McpTool.RequireApproval> requireApproval()
Specify which of the MCP server's tools require approval.
-
serverDescription
final Optional<String> serverDescription()
Optional description of the MCP server, used to provide more context.
-
serverUrl
final Optional<String> serverUrl()
The URL for the MCP server. One of
server_url
orconnector_id
must be provided.
-
_serverLabel
final JsonField<String> _serverLabel()
Returns the raw JSON value of serverLabel.
Unlike serverLabel, this method doesn't throw if the JSON field has an unexpected type.
-
_allowedTools
final JsonField<RealtimeSessionCreateResponse.Tool.McpTool.AllowedTools> _allowedTools()
Returns the raw JSON value of allowedTools.
Unlike allowedTools, this method doesn't throw if the JSON field has an unexpected type.
-
_authorization
final JsonField<String> _authorization()
Returns the raw JSON value of authorization.
Unlike authorization, this method doesn't throw if the JSON field has an unexpected type.
-
_connectorId
final JsonField<RealtimeSessionCreateResponse.Tool.McpTool.ConnectorId> _connectorId()
Returns the raw JSON value of connectorId.
Unlike connectorId, this method doesn't throw if the JSON field has an unexpected type.
-
_headers
final JsonField<RealtimeSessionCreateResponse.Tool.McpTool.Headers> _headers()
Returns the raw JSON value of headers.
Unlike headers, this method doesn't throw if the JSON field has an unexpected type.
-
_requireApproval
final JsonField<RealtimeSessionCreateResponse.Tool.McpTool.RequireApproval> _requireApproval()
Returns the raw JSON value of requireApproval.
Unlike requireApproval, this method doesn't throw if the JSON field has an unexpected type.
-
_serverDescription
final JsonField<String> _serverDescription()
Returns the raw JSON value of serverDescription.
Unlike serverDescription, this method doesn't throw if the JSON field has an unexpected type.
-
_serverUrl
final JsonField<String> _serverUrl()
Returns the raw JSON value of serverUrl.
Unlike serverUrl, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RealtimeSessionCreateResponse.Tool.McpTool.Builder toBuilder()
-
validate
final RealtimeSessionCreateResponse.Tool.McpTool validate()
-
builder
final static RealtimeSessionCreateResponse.Tool.McpTool.Builder builder()
Returns a mutable builder for constructing an instance of McpTool.
The following fields are required:
.serverLabel()
-
-
-
-