Skip to main content

axocoatl_tools/
error.rs

1#[derive(Debug, thiserror::Error)]
2pub enum ToolError {
3    #[error("Tool not found: {0}")]
4    NotFound(String),
5
6    #[error("Tool execution failed: {tool} — {reason}")]
7    ExecutionFailed { tool: String, reason: String },
8
9    #[error("Invalid arguments for tool {tool}: {reason}")]
10    InvalidArgs { tool: String, reason: String },
11
12    #[error("Serialization error: {0}")]
13    Serialization(#[from] serde_json::Error),
14}