pub enum Tool {
Bash,
Read,
Write,
Edit,
Glob,
Grep,
WebFetch,
WebSearch,
NotebookEdit,
TodoWrite,
Task,
Custom(String),
}Expand description
A tool an agent can call, for AgentConfig::allow_tool
and AgentConfig::disallowed_tools.
The known variants are the Claude Code built-in tools; a misspelled
variant does not compile, where a misspelled string is silently ignored by
the CLI. Custom carries anything else verbatim: an MCP
tool (mcp__server__tool) or a permission pattern (Bash(git log:*)).
§Examples
use ironflow_core::provider::Tool;
assert_eq!(Tool::WebSearch.to_string(), "WebSearch");
assert_eq!(Tool::Custom("mcp__github__search".to_string()).to_string(), "mcp__github__search");Variants§
Bash
Run shell commands.
Read
Read files.
Write
Create or overwrite files.
Edit
Edit files in place.
Glob
Find files by glob pattern.
Grep
Search file contents.
WebFetch
Fetch a URL.
WebSearch
Search the web.
NotebookEdit
Edit Jupyter notebooks.
TodoWrite
Maintain a todo list.
Task
Delegate to a sub-agent.
Custom(String)
Any other tool name or permission pattern, passed as is.
Trait Implementations§
impl Eq for Tool
impl StructuralPartialEq for Tool
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin for Tool
impl UnwindSafe for Tool
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.