pub struct CanUseToolRequest {Show 18 fields
pub tool_name: String,
pub input: Value,
pub tool_use_id: Option<String>,
pub permission_suggestions: Option<Vec<Value>>,
pub decision_reason: Option<String>,
pub decision_reason_type: Option<String>,
pub mcp_server: Option<Value>,
pub blocked_path: Option<String>,
pub classifier_approvable: Option<bool>,
pub suppress_always_allow_rule: Option<bool>,
pub default_to_no: Option<bool>,
pub matched_ask_rule: Option<Value>,
pub title: Option<String>,
pub display_name: Option<String>,
pub description: Option<String>,
pub agent_id: Option<String>,
pub requires_user_interaction: Option<bool>,
pub extra: HashMap<String, Value>,
}Expand description
Source: binary can_use_tool schema; query.py:244–262
Fields§
§tool_name: String§input: Value§tool_use_id: Option<String>§permission_suggestions: Option<Vec<Value>>Permission updates that would stop the CLI asking again; return them
with ToolDecision::allow_and_remember for “always allow”.
decision_reason: Option<String>Human-readable reason the CLI asks; may carry ANSI escapes.
decision_reason_type: Option<String>Why the ask escalated: “rule”, “hook”, “safetyCheck”, “classifier”, …
mcp_server: Option<Value>MCP server of the tool: {"name", "source"}.
blocked_path: Option<String>Path outside the allowed directories that triggered the ask.
classifier_approvable: Option<bool>§suppress_always_allow_rule: Option<bool>Do not offer “always allow” for this ask.
default_to_no: Option<bool>The ask must not be approvable by a single stray keystroke.
matched_ask_rule: Option<Value>§title: Option<String>§display_name: Option<String>§description: Option<String>§agent_id: Option<String>Subagent that wants to use the tool.
requires_user_interaction: Option<bool>§extra: HashMap<String, Value>Fields not named above.
Trait Implementations§
Source§impl Clone for CanUseToolRequest
impl Clone for CanUseToolRequest
Source§impl Debug for CanUseToolRequest
impl Debug for CanUseToolRequest
Source§impl<'de> Deserialize<'de> for CanUseToolRequest
impl<'de> Deserialize<'de> for CanUseToolRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for CanUseToolRequest
impl Freeze for CanUseToolRequest
impl Move for CanUseToolRequest
impl RefUnwindSafe for CanUseToolRequest
impl Send for CanUseToolRequest
impl Sync for CanUseToolRequest
impl Unpin for CanUseToolRequest
impl UnsafeUnpin for CanUseToolRequest
impl UnwindSafe for CanUseToolRequest
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