Skip to main content

clawedcode_tools/
lib.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct ToolSpec {
5    pub name: &'static str,
6    pub description: &'static str,
7    pub needs_approval: bool,
8}
9
10pub fn builtin_tools() -> Vec<ToolSpec> {
11    vec![
12        ToolSpec {
13            name: "shell",
14            description: "Run local commands inside the working directory",
15            needs_approval: true,
16        },
17        ToolSpec {
18            name: "apply_patch",
19            description: "Apply structured file edits",
20            needs_approval: true,
21        },
22        ToolSpec {
23            name: "plan",
24            description: "Track execution steps and current status",
25            needs_approval: false,
26        },
27        ToolSpec {
28            name: "task",
29            description: "Spawn bounded background work items",
30            needs_approval: false,
31        },
32    ]
33}