Skip to main content

ToolContext

Trait ToolContext 

Source
pub trait ToolContext: Send + Sync {
    // Required methods
    fn key_value_store(&self) -> &dyn KeyValueStore;
    fn plugin_id(&self) -> &str;
    fn agent_id(&self) -> &str;
}
Expand description

Execution context passed to Tool::execute() and Skill::execute_tool().

Provides access to the key-value store, plugin identity, and agent identity. This is the plugin’s window into the host.

Required Methods§

Source

fn key_value_store(&self) -> &dyn KeyValueStore

Access the key-value store for plugin state.

Source

fn plugin_id(&self) -> &str

The ID of the plugin that owns this tool.

Source

fn agent_id(&self) -> &str

The ID of the agent invoking this tool.

Implementors§