pub enum ToolAction {
Show 13 variants
FileAccess(String),
FileWrite(String, Vec<u8>),
NetworkEgress(String, u16),
ShellCommand(String),
McpTool(String, Value),
Patch(String, String),
CodeExecution {
language: String,
code: String,
},
BrowserAction {
verb: String,
target: Option<String>,
},
DatabaseQuery {
database: String,
query: String,
},
ExternalApiCall {
service: String,
endpoint: String,
},
MemoryWrite {
store: String,
key: String,
},
MemoryRead {
store: String,
key: Option<String>,
},
Unknown,
}Expand description
A categorized action derived from a tool call request.
This plays the same role as ClawdStrike’s GuardAction enum, but is
produced by inspecting ToolCallRequest fields rather than being
supplied directly.
Variants§
FileAccess(String)
File system read (path).
FileWrite(String, Vec<u8>)
File system write (path, content bytes).
NetworkEgress(String, u16)
Network egress (host, port).
ShellCommand(String)
Shell command execution (command line).
McpTool(String, Value)
MCP tool invocation (tool_name, args).
Patch(String, String)
Patch application (file, diff).
CodeExecution
Code execution via an interpreter (language, code snippet).
BrowserAction
Browser automation action (verb, optional target URL).
DatabaseQuery
Database query (database/engine identifier, raw query text).
ExternalApiCall
External API call (service name, endpoint/path).
MemoryWrite
Agent memory write (store/collection id, key).
MemoryRead
Agent memory read (store/collection id, optional key).
Unknown
Unknown / not categorized – guards that don’t match should allow.
Implementations§
Source§impl ToolAction
impl ToolAction
Sourcepub fn filesystem_path(&self) -> Option<&str>
pub fn filesystem_path(&self) -> Option<&str>
Return the path targeted by clearly filesystem-shaped actions.
Trait Implementations§
Source§impl Clone for ToolAction
impl Clone for ToolAction
Source§fn clone(&self) -> ToolAction
fn clone(&self) -> ToolAction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more