Class RealtimeResponseCreateMcpTool
-
- All Implemented Interfaces:
public final class RealtimeResponseCreateMcpToolGive 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 classRealtimeResponseCreateMcpTool.BuilderA builder for RealtimeResponseCreateMcpTool.
public final classRealtimeResponseCreateMcpTool.AllowedToolsList of allowed tool names or a filter object.
public final classRealtimeResponseCreateMcpTool.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 classRealtimeResponseCreateMcpTool.HeadersOptional HTTP headers to send to the MCP server. Use for authentication or other purposes.
public final classRealtimeResponseCreateMcpTool.RequireApprovalSpecify which of the MCP server's tools require approval.
-
Method Summary
Modifier and Type Method Description final StringserverLabel()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.BuildertoBuilder()final RealtimeResponseCreateMcpToolvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RealtimeResponseCreateMcpTool.Builderbuilder()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_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<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_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<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()
-
-
-
-