llm_stack/tool/error.rs
1//! Tool error types.
2
3/// Error returned by tool execution.
4#[derive(Debug, thiserror::Error)]
5#[error("{message}")]
6pub struct ToolError {
7 /// Human-readable error description.
8 pub message: String,
9}
10
11impl ToolError {
12 /// Creates a new tool error with the given message.
13 pub fn new(message: impl Into<String>) -> Self {
14 Self {
15 message: message.into(),
16 }
17 }
18}