WebMcpToolException class final

A failure that should be returned to the agent in a structured form.

Implemented types

Constructors

WebMcpToolException({required String code, required String message, Object? details, Object? cause})
Creates a tool failure safe to return to the calling agent.
const

Properties

cause → Object?
Original local error. It is logged but is not sent to the agent.
final
code → String
A stable, machine-readable identifier such as task_not_found.
final
details → Object?
Optional JSON-serializable context that can help the agent recover.
final
hashCode → int
The hash code for this object.
no setterinherited
message → String
A short explanation safe to show to the user and the agent.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited