diff --git a/server/src/tools.rs b/server/src/tools.rs index 96de03f..3d2dda8 100644 --- a/server/src/tools.rs +++ b/server/src/tools.rs @@ -18,7 +18,9 @@ pub struct CreateRelationsTool { #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct ObservationInput { + /// The name of the entity. pub entity_name: String, + /// The observation contents. pub contents: Vec, } @@ -38,7 +40,9 @@ pub struct DeleteEntitiesTool { #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct DeleteObservationInput { + /// The name of the entity. pub entity_name: String, + /// The observations to delete. pub observations: Vec, } @@ -313,14 +317,19 @@ pub struct QueryGraphPathTool { /// Define a strict checklist of acceptance criteria for a given task or feature before starting work. #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct SetAcceptanceCriteriaTool { + /// The title of the task. pub task_title: String, + /// A list of acceptance criteria requirements. pub criteria: Vec, } /// Mark a previously defined acceptance criteria as met by providing cryptographic-like proof. #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct VerifyAcceptanceCriteriaTool { + /// The ID of the task. pub task_id: String, + /// The specific criterion being verified. pub criteria: String, + /// The proof or evidence that the criterion is met. pub proof: String, } @@ -434,27 +443,35 @@ pub struct ProcessLogsTool { /// Read a file and return only its AST skeleton (Imports, Structs, Enums, Traits, Functions) #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct ReadFileSkeletonTool { + /// The path to the file to read. pub file_path: String, } /// Replace a specific AST node in a file (robust structural editing). Use this instead of regex or line-based string replacement to prevent indentation bugs and matching failures. #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct ReplaceAstNodeTool { + /// The path of the file to modify. pub file_path: String, - pub node_type: String, // e.g., "function_item", "impl_item" - pub node_name: String, // e.g., "execute" + /// The AST node type to replace (e.g., 'function_item', 'impl_item'). + pub node_type: String, + /// The name of the specific AST node to replace (e.g., 'execute'). + pub node_name: String, + /// The completely new structural content for this AST node. pub new_content: String, } /// Semantic code search using local vector embeddings. Use this conceptual search instead of raw regex (grep) when trying to locate abstract logic or exploring new patterns. #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct SemanticCodeSearchTool { + /// The conceptual or semantic search query. pub query: String, + /// Optional directory to restrict the search to. pub directory: Option, } /// Get a bird's-eye view of directory architecture. Use this when first exploring a new repository to get a summary of what each file is responsible for, instead of blindly reading files. #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct ReadDirectoryArchitectureTool { + /// The directory path to analyze. pub directory: String, } #[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)] @@ -677,9 +694,9 @@ pub struct TasksTool { /// Optional assigned subagent role or identifier. pub assigned_agent: Option, /// Optional verification command to validate criteria completion. + pub verification_command: Option, /// Optional pagination offset for 'list'. pub offset: Option, - pub verification_command: Option, } #[derive(Debug, Deserialize, Serialize, JsonSchema, PartialEq)] @@ -787,7 +804,7 @@ pub enum DecisionAction { /// Next steps on error: Provide title for 'log' or id for 'update'/'delete'. #[derive(Deserialize, Serialize, JsonSchema, Debug, Clone)] pub struct DecisionsTool { - /// Action to perform: 'log', 'query', or 'delete'. + /// Action to perform: 'log', 'query', 'update', or 'delete'. pub action: DecisionAction, /// ADR ID (required for 'delete'). pub id: Option, @@ -949,7 +966,7 @@ pub enum ClipboardAction { /// "look at clipboard", "what I copied", or shares terminal error captures. #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct ClipboardTool { - /// Action to perform: 'image', 'text', 'history', 'clear', 'read', or 'write'. + /// Action to perform: 'image', 'text', 'history', 'clear', or 'write'. pub action: ClipboardAction, /// Plain text content (for 'write'). pub text: Option,