Class ResponseItem.McpCall
-
- All Implemented Interfaces:
public final class ResponseItem.McpCall
An invocation of a tool on an MCP server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ResponseItem.McpCall.Builder
A builder for McpCall.
-
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>
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>
_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 ResponseItem.McpCall.Builder
toBuilder()
final ResponseItem.McpCall
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseItem.McpCall.Builder
builder()
Returns a mutable builder for constructing an instance of McpCall. -
-
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).
-
_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.
-
_error
final JsonField<String> _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 ResponseItem.McpCall.Builder toBuilder()
-
validate
final ResponseItem.McpCall validate()
-
builder
final static ResponseItem.McpCall.Builder builder()
Returns a mutable builder for constructing an instance of McpCall.
The following fields are required:
.id() .arguments() .name() .serverLabel()
-
-
-
-