pub struct SkillTool { /* private fields */ }Expand description
The skill tool. It is registered on StaticToolRegistry and shared across sessions
of the owning AgentCore via process_tools (it is not a process-global
singleton—a single process may host multiple AgentCore instances, each with its own
skill index).
Implementations§
Source§impl SkillTool
impl SkillTool
Sourcepub fn new(skills: Arc<BTreeMap<String, SkillEntry>>) -> Self
pub fn new(skills: Arc<BTreeMap<String, SkillEntry>>) -> Self
Constructs a skill tool. When skills is empty, callers should not register
this tool
(the schema’s name enum will be empty, so it will always fail) — see
Self::has_skills.
Sourcepub fn has_skills(skills: &BTreeMap<String, SkillEntry>) -> bool
pub fn has_skills(skills: &BTreeMap<String, SkillEntry>) -> bool
Whether any skills were discovered. The assembler uses this to decide whether to register this tool.
Trait Implementations§
Source§impl Tool for SkillTool
impl Tool for SkillTool
Source§fn schema(&self) -> &ToolSchema
fn schema(&self) -> &ToolSchema
Tool metadata. Returns a reference to avoid allocating on every call.
Source§fn safety_hint(&self, _args: &Value) -> SafetyClass
fn safety_hint(&self, _args: &Value) -> SafetyClass
Provides a safety-level hint to the sandbox policy without actually executing the
tool. Read more
Source§fn describe<'a>(
&'a self,
args: &'a Value,
_ctx: ToolContext<'a>,
) -> BoxFuture<'a, ToolCallDescription>
fn describe<'a>( &'a self, args: &'a Value, _ctx: ToolContext<'a>, ) -> BoxFuture<'a, ToolCallDescription>
Generates a “self-description” before execution, for display to the ACP client. Read more
Source§fn execute(&self, args: Value, _ctx: ToolContext<'_>) -> ToolStream
fn execute(&self, args: Value, _ctx: ToolContext<'_>) -> ToolStream
Initiates a tool call and returns an event stream. Read more
Auto Trait Implementations§
impl Freeze for SkillTool
impl RefUnwindSafe for SkillTool
impl Send for SkillTool
impl Sync for SkillTool
impl Unpin for SkillTool
impl UnsafeUnpin for SkillTool
impl UnwindSafe for SkillTool
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