pub enum ToolKind {
Shell,
FileRead,
FileWrite,
FileEdit,
Search,
SubAgent,
Web,
Notebook,
Other,
}Expand description
Normalized tool category — provider-agnostic classification of tool calls.
Providers map their native tool names (e.g. Claude’s Read, Copilot’s view)
to this enum so consumers can distinguish tool types without hardcoding
provider-specific strings.
Variants§
Shell
Shell/command execution (Claude Bash, Copilot bash, Codex shell calls)
FileRead
File read operations (Claude Read, Copilot view)
FileWrite
File creation/overwrite (Claude Write, Codex write_file)
FileEdit
File modification/patching (Claude Edit, Codex apply_patch, Copilot edit)
Search
File/content search (Claude Glob/Grep)
SubAgent
Sub-agent delegation (Claude Agent)
Web
Web/network operations
Notebook
Notebook operations
Other
Tool kind could not be determined from the provider’s tool name
Implementations§
Source§impl ToolKind
impl ToolKind
Sourcepub fn infer(name: &str) -> Self
pub fn infer(name: &str) -> Self
Best-effort classification from any tool name (case-insensitive heuristic).
Provider-specific classifiers (which map exact tool names) should live in their respective provider modules in the binary crate. This generic fallback is for cases where the provider is unknown or for wrapper-level code.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolKind
impl<'de> Deserialize<'de> for ToolKind
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>,
impl Copy for ToolKind
impl Eq for ToolKind
impl StructuralPartialEq for ToolKind
Auto Trait Implementations§
impl Freeze for ToolKind
impl RefUnwindSafe for ToolKind
impl Send for ToolKind
impl Sync for ToolKind
impl Unpin for ToolKind
impl UnsafeUnpin for ToolKind
impl UnwindSafe for ToolKind
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
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
key and return true if they are equal.