pub enum ToolError {
InvalidParams(String),
PolicyRejected(String),
SizeLimitExceeded(String),
Internal(String),
}Expand description
Errors returned from ToolHandler::call.
Each variant maps to a JSON-RPC -32000 application-error response.
The serve loop converts these to the wire format.
Variants§
InvalidParams(String)
The caller supplied parameters that do not match the tool schema.
PolicyRejected(String)
A policy gate returned Reject, Quarantine, or BreakGlass.
Per ADR 0045 §3, a BreakGlass composed outcome is treated as Reject at the MCP boundary. No write occurs when this variant is returned.
SizeLimitExceeded(String)
The incoming payload exceeds the server-side size limit (RT-5).
Internal(String)
An unexpected internal error that is not one of the above categories.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolError
impl RefUnwindSafe for ToolError
impl Send for ToolError
impl Sync for ToolError
impl Unpin for ToolError
impl UnsafeUnpin for ToolError
impl UnwindSafe for ToolError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more