Class RealtimeResponseCreateMcpTool
-
- All Implemented Interfaces:
public final class RealtimeResponseCreateMcpTool
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
RealtimeResponseCreateMcpTool.Builder
A builder for RealtimeResponseCreateMcpTool.
public final class
RealtimeResponseCreateMcpTool.AllowedTools
List of allowed tool names or a filter object.
public final class
RealtimeResponseCreateMcpTool.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
RealtimeResponseCreateMcpTool.Headers
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
public final class
RealtimeResponseCreateMcpTool.RequireApproval
Specify which of the MCP server's tools require approval.
-
Method Summary
Modifier and Type Method Description final String
serverLabel()
A label for this MCP server, used to identify it in tool calls. final JsonValue
_type()
The type of the MCP tool. final Optional<RealtimeResponseCreateMcpTool.AllowedTools>
allowedTools()
List of allowed tool names or a filter object. 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. final Optional<RealtimeResponseCreateMcpTool.ConnectorId>
connectorId()
Identifier for service connectors, like those available in ChatGPT. final Optional<RealtimeResponseCreateMcpTool.Headers>
headers()
Optional HTTP headers to send to the MCP server. final Optional<RealtimeResponseCreateMcpTool.RequireApproval>
requireApproval()
Specify which of the MCP server's tools require approval. final Optional<String>
serverDescription()
Optional description of the MCP server, used to provide more context. final Optional<String>
serverUrl()
The URL for the MCP server. final JsonField<String>
_serverLabel()
Returns the raw JSON value of serverLabel. final JsonField<RealtimeResponseCreateMcpTool.AllowedTools>
_allowedTools()
Returns the raw JSON value of allowedTools. final JsonField<String>
_authorization()
Returns the raw JSON value of authorization. final JsonField<RealtimeResponseCreateMcpTool.ConnectorId>
_connectorId()
Returns the raw JSON value of connectorId. final JsonField<RealtimeResponseCreateMcpTool.Headers>
_headers()
Returns the raw JSON value of headers. final JsonField<RealtimeResponseCreateMcpTool.RequireApproval>
_requireApproval()
Returns the raw JSON value of requireApproval. final JsonField<String>
_serverDescription()
Returns the raw JSON value of serverDescription. final JsonField<String>
_serverUrl()
Returns the raw JSON value of serverUrl. final Map<String, JsonValue>
_additionalProperties()
final RealtimeResponseCreateMcpTool.Builder
toBuilder()
final RealtimeResponseCreateMcpTool
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static RealtimeResponseCreateMcpTool.Builder
builder()
Returns a mutable builder for constructing an instance of RealtimeResponseCreateMcpTool. -
-
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<RealtimeResponseCreateMcpTool.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<RealtimeResponseCreateMcpTool.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<RealtimeResponseCreateMcpTool.Headers> headers()
Optional HTTP headers to send to the MCP server. Use for authentication or other purposes.
-
requireApproval
final Optional<RealtimeResponseCreateMcpTool.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<RealtimeResponseCreateMcpTool.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<RealtimeResponseCreateMcpTool.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<RealtimeResponseCreateMcpTool.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<RealtimeResponseCreateMcpTool.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 RealtimeResponseCreateMcpTool.Builder toBuilder()
-
validate
final RealtimeResponseCreateMcpTool validate()
-
builder
final static RealtimeResponseCreateMcpTool.Builder builder()
Returns a mutable builder for constructing an instance of RealtimeResponseCreateMcpTool.
The following fields are required:
.serverLabel()
-
-
-
-