Skip to main content

Module error

Module error 

Source
Expand description

Structured error types for MCP tool responses.

Every error carries a machine-readable ErrorCode and a human-readable message. Most codes also get a default suggestion string that helps LLMs self-correct without a round-trip to the user.

Structs§

McpError
An error type designed for MCP tool responses.

Enums§

ErrorCode
Machine-readable error codes returned in MCP tool error responses.

Functions§

is_connection_lost
Classify an error message as one where the underlying connection is no longer usable and the caller should recycle it. Used to decide whether the crate::engine::Engine should be torn down and reinitialized before the next call.