Class RealtimeMcpToolCall
-
- All Implemented Interfaces:
public final class RealtimeMcpToolCall
A Realtime item representing an invocation of a tool on an MCP server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
RealtimeMcpToolCall.Builder
A builder for RealtimeMcpToolCall.
public final class
RealtimeMcpToolCall.Error
The error from the tool call, if any.
-
Method Summary
Modifier and Type Method Description final String
id()
The unique ID of the tool call. final String
arguments()
A JSON string of the arguments passed to the tool. final String
name()
The name of the tool that was run. final String
serverLabel()
The label of the MCP server running the tool. final JsonValue
_type()
The type of the item. final Optional<String>
approvalRequestId()
The ID of an associated approval request, if any. final Optional<RealtimeMcpToolCall.Error>
error()
The error from the tool call, if any. final Optional<String>
output()
The output from the tool call. final JsonField<String>
_id()
Returns the raw JSON value of id. final JsonField<String>
_arguments()
Returns the raw JSON value of arguments. final JsonField<String>
_name()
Returns the raw JSON value of name. final JsonField<String>
_serverLabel()
Returns the raw JSON value of serverLabel. final JsonField<String>
_approvalRequestId()
Returns the raw JSON value of approvalRequestId. final JsonField<RealtimeMcpToolCall.Error>
_error()
Returns the raw JSON value of error. final JsonField<String>
_output()
Returns the raw JSON value of output. final Map<String, JsonValue>
_additionalProperties()
final RealtimeMcpToolCall.Builder
toBuilder()
final RealtimeMcpToolCall
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static RealtimeMcpToolCall.Builder
builder()
Returns a mutable builder for constructing an instance of RealtimeMcpToolCall. -
-
Method Detail
-
serverLabel
final String serverLabel()
The label of the MCP server running the tool.
-
_type
final JsonValue _type()
The type of the item. Always
mcp_call
.Expected to always return the following:
JsonValue.from("mcp_call")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
approvalRequestId
final Optional<String> approvalRequestId()
The ID of an associated approval request, if any.
-
error
final Optional<RealtimeMcpToolCall.Error> error()
The error from the tool call, if any.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_arguments
final JsonField<String> _arguments()
Returns the raw JSON value of arguments.
Unlike arguments, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_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.
-
_approvalRequestId
final JsonField<String> _approvalRequestId()
Returns the raw JSON value of approvalRequestId.
Unlike approvalRequestId, this method doesn't throw if the JSON field has an unexpected type.
-
_error
final JsonField<RealtimeMcpToolCall.Error> _error()
Returns the raw JSON value of error.
Unlike error, this method doesn't throw if the JSON field has an unexpected type.
-
_output
final JsonField<String> _output()
Returns the raw JSON value of output.
Unlike output, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RealtimeMcpToolCall.Builder toBuilder()
-
validate
final RealtimeMcpToolCall validate()
-
builder
final static RealtimeMcpToolCall.Builder builder()
Returns a mutable builder for constructing an instance of RealtimeMcpToolCall.
The following fields are required:
.id() .arguments() .name() .serverLabel()
-
-
-
-