From 5563622557ac60b6842f6c09c4c76a5ece9f6d09 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 15 Nov 2026 15:27:16 +0100 Subject: 0.4.0: grep takes a regular expression, fixed=true for literals Invalid patterns explain themselves and point at fixed, rather than failing with a bare regex error the model cannot act on. --- src/tools/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/tools/mod.rs') diff --git a/src/tools/mod.rs b/src/tools/mod.rs index 503de08..7a1a26d 100644 --- a/src/tools/mod.rs +++ b/src/tools/mod.rs @@ -117,13 +117,14 @@ pub fn schemas() -> Vec { "type": "function", "function": { "name": "grep", - "description": "Search file contents for a literal string, recursively. Skips .git, target, node_modules and similar.", + "description": "Search file contents recursively with a regular expression. Skips .git, target, node_modules and similar. Set fixed=true to match literal text instead.", "parameters": { "type": "object", "properties": { - "pattern": { "type": "string" }, + "pattern": { "type": "string", "description": "regular expression, or literal text when fixed=true" }, "path": { "type": "string", "description": "file or directory (default .)" }, - "ignore_case": { "type": "boolean" } + "ignore_case": { "type": "boolean" }, + "fixed": { "type": "boolean", "description": "treat pattern as literal text" } }, "required": ["pattern"] } -- cgit v1.2.3