Class RealtimeSessionCreateResponse.Tool.McpTool
-
- All Implemented Interfaces:
public final class RealtimeSessionCreateResponse.Tool.McpToolGive 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 classRealtimeSessionCreateResponse.Tool.McpTool.BuilderA builder for McpTool.
public final classRealtimeSessionCreateResponse.Tool.McpTool.AllowedToolsList of allowed tool names or a filter object.
public final classRealtimeSessionCreateResponse.Tool.McpTool.ConnectorIdIdentifier for service connectors, like those available in ChatGPT. One of
server_urlorconnector_idmust be provided. Learn more about service connectors here.Currently supported
connector_idvalues are:Dropbox:
connector_dropboxGmail:
connector_gmailGoogle Calendar:
connector_googlecalendarGoogle Drive:
connector_googledriveMicrosoft Teams:
connector_microsoftteamsOutlook Calendar:
connector_outlookcalendarOutlook Email:
connector_outlookemailSharePoint:
connector_sharepoint
public final classRealtimeSessionCreateResponse.Tool.McpTool.HeadersOptional HTTP headers to send to the MCP server. Use for authentication or other purposes.
public final classRealtimeSessionCreateResponse.Tool.McpTool.RequireApprovalSpecify 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_urlorconnector_idmust be provided. Learn more about service connectors here.Currently supported
connector_idvalues are:Dropbox:
connector_dropboxGmail:
connector_gmailGoogle Calendar:
connector_googlecalendarGoogle Drive:
connector_googledriveMicrosoft Teams:
connector_microsoftteamsOutlook Calendar:
connector_outlookcalendarOutlook Email:
connector_outlookemailSharePoint:
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_urlorconnector_idmust 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()
-
-
-
-