Class BetaManagedAgentsAgentMcpToolResultEvent
-
- All Implemented Interfaces:
public final class BetaManagedAgentsAgentMcpToolResultEventEvent representing the result of an MCP tool execution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsAgentMcpToolResultEvent.BuilderA builder for BetaManagedAgentsAgentMcpToolResultEvent.
public final classBetaManagedAgentsAgentMcpToolResultEvent.ContentContent block in a tool result. Can be
text,image,document, orsearch_result.
-
Method Summary
Modifier and Type Method Description final Stringid()Unique identifier for this event. final StringmcpToolUseId()The id of the agent.mcp_tool_useevent this result corresponds to.final OffsetDateTimeprocessedAt()Timestamp when this event was processed. final Optional<List<BetaManagedAgentsAgentMcpToolResultEvent.Content>>content()The result content returned by the tool. final Optional<Boolean>isError()Whether the tool execution resulted in an error. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("agent.mcp_tool_result")final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_mcpToolUseId()Returns the raw JSON value of mcpToolUseId. final JsonField<OffsetDateTime>_processedAt()Returns the raw JSON value of processedAt. final JsonField<List<BetaManagedAgentsAgentMcpToolResultEvent.Content>>_content()Returns the raw JSON value of content. final JsonField<Boolean>_isError()Returns the raw JSON value of isError. final Map<String, JsonValue>_additionalProperties()final BetaManagedAgentsAgentMcpToolResultEvent.BuildertoBuilder()final BetaManagedAgentsAgentMcpToolResultEventvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsAgentMcpToolResultEvent.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsAgentMcpToolResultEvent. -
-
Method Detail
-
mcpToolUseId
final String mcpToolUseId()
The id of the
agent.mcp_tool_useevent this result corresponds to.
-
processedAt
final OffsetDateTime processedAt()
Timestamp when this event was processed.
-
content
final Optional<List<BetaManagedAgentsAgentMcpToolResultEvent.Content>> content()
The result content returned by the tool.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("agent.mcp_tool_result")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.
-
_mcpToolUseId
final JsonField<String> _mcpToolUseId()
Returns the raw JSON value of mcpToolUseId.
Unlike mcpToolUseId, this method doesn't throw if the JSON field has an unexpected type.
-
_processedAt
final JsonField<OffsetDateTime> _processedAt()
Returns the raw JSON value of processedAt.
Unlike processedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_content
final JsonField<List<BetaManagedAgentsAgentMcpToolResultEvent.Content>> _content()
Returns the raw JSON value of content.
Unlike content, this method doesn't throw if the JSON field has an unexpected type.
-
_isError
final JsonField<Boolean> _isError()
Returns the raw JSON value of isError.
Unlike isError, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaManagedAgentsAgentMcpToolResultEvent.Builder toBuilder()
-
validate
final BetaManagedAgentsAgentMcpToolResultEvent validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaManagedAgentsAgentMcpToolResultEvent.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsAgentMcpToolResultEvent.
The following fields are required:
.id() .mcpToolUseId() .processedAt()
-
-
-
-