pub const GREP_TOOL_SCHEMA: &str = r#"{
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "The regular expression pattern to search for"
},
"path": {
"type": "string",
"description": "File or directory to search in. Defaults to current directory."
},
"glob": {
"type": "string",
"description": "Glob pattern to filter files (e.g., '*.js', '*.{ts,tsx}')"
},
"type": {
"type": "string",
"description": "File type to search (e.g., 'js', 'py', 'rust', 'go'). More efficient than glob for standard types."
},
"output_mode": {
"type": "string",
"enum": ["files_with_matches", "content", "count"],
"description": "Output mode. Defaults to 'files_with_matches'."
},
"-i": {
"type": "boolean",
"description": "Case insensitive search. Defaults to false."
},
"-n": {
"type": "boolean",
"description": "Show line numbers (content mode only). Defaults to true."
},
"-A": {
"type": "integer",
"description": "Lines to show after each match (content mode only)."
},
"-B": {
"type": "integer",
"description": "Lines to show before each match (content mode only)."
},
"-C": {
"type": "integer",
"description": "Lines to show before and after each match (content mode only)."
},
"multiline": {
"type": "boolean",
"description": "Enable multiline mode where . matches newlines. Defaults to false."
},
"limit": {
"type": "integer",
"description": "Maximum number of results to return. Defaults to 1000."
}
},
"required": ["pattern"]
}"#;Expand description
Grep tool JSON schema constant.