Skip to main content

ToolSpec

Trait ToolSpec 

Source
pub trait ToolSpec {
    type Params: DeserializeOwned + JsonSchema + Send;
    type Result: Into<ToolResult> + Send;
    type Error: StdError + Send + Sync + 'static;

    const NAME: &'static str;
    const DISPLAY_NAME: &'static str;

    // Required method
    fn execution_error(error: Self::Error) -> ToolExecutionError;
}

Required Associated Constants§

Source

const NAME: &'static str

Source

const DISPLAY_NAME: &'static str

Required Associated Types§

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ToolSpec for AstGrepToolSpec

Source§

const NAME: &'static str = AST_GREP_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "AST Grep"

Source§

type Params = AstGrepParams

Source§

type Result = AstGrepResult

Source§

type Error = AstGrepError

Source§

impl ToolSpec for BashToolSpec

Source§

const NAME: &'static str = BASH_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "Bash"

Source§

type Params = BashParams

Source§

type Result = BashResult

Source§

type Error = BashError

Source§

impl ToolSpec for DispatchAgentToolSpec

Source§

const NAME: &'static str = DISPATCH_AGENT_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "Dispatch Agent"

Source§

type Params = DispatchAgentParams

Source§

type Result = AgentResult

Source§

type Error = DispatchAgentError

Source§

impl ToolSpec for MultiEditToolSpec

Source§

const NAME: &'static str = MULTI_EDIT_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "Multi Edit"

Source§

type Params = MultiEditParams

Source§

type Result = MultiEditResult

Source§

type Error = MultiEditError

Source§

impl ToolSpec for EditToolSpec

Source§

const NAME: &'static str = EDIT_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "Edit File"

Source§

type Params = EditParams

Source§

type Result = EditResult

Source§

type Error = EditError

Source§

impl ToolSpec for FetchToolSpec

Source§

const NAME: &'static str = FETCH_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "Fetch URL"

Source§

type Params = FetchParams

Source§

type Result = FetchResult

Source§

type Error = FetchError

Source§

impl ToolSpec for GlobToolSpec

Source§

const NAME: &'static str = GLOB_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "Glob"

Source§

type Params = GlobParams

Source§

type Result = GlobResult

Source§

type Error = GlobError

Source§

impl ToolSpec for GrepToolSpec

Source§

const NAME: &'static str = GREP_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "Grep"

Source§

type Params = GrepParams

Source§

type Result = GrepResult

Source§

type Error = GrepError

Source§

impl ToolSpec for LsToolSpec

Source§

const NAME: &'static str = LS_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "List Files"

Source§

type Params = LsParams

Source§

type Result = FileListResult

Source§

type Error = LsError

Source§

impl ToolSpec for ReplaceToolSpec

Source§

const NAME: &'static str = REPLACE_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "Replace File"

Source§

type Params = ReplaceParams

Source§

type Result = ReplaceResult

Source§

type Error = ReplaceError

Source§

impl ToolSpec for TodoReadToolSpec

Source§

const NAME: &'static str = TODO_READ_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "Read Todos"

Source§

type Params = TodoReadParams

Source§

type Result = TodoListResult

Source§

type Error = TodoReadError

Source§

impl ToolSpec for TodoWriteToolSpec

Source§

const NAME: &'static str = TODO_WRITE_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "Write Todos"

Source§

type Params = TodoWriteParams

Source§

type Result = TodoWriteResult

Source§

type Error = TodoWriteError

Source§

impl ToolSpec for ViewToolSpec

Source§

const NAME: &'static str = VIEW_TOOL_NAME

Source§

const DISPLAY_NAME: &'static str = "View File"

Source§

type Params = ViewParams

Source§

type Result = FileContentResult

Source§

type Error = ViewError