find_text
Search for specific text patterns within project files using customizable filters like file type, regex, case sensitivity, and whole-word matching. Supports context lines for better result understanding.
Instructions
Search for text pattern in project files.
Args:
project: Project name
pattern: Text pattern to search for
file_pattern: Optional glob pattern (e.g., "**/*.py")
max_results: Maximum number of results
case_sensitive: Whether to do case-sensitive matching
whole_word: Whether to match whole words only
use_regex: Whether to treat pattern as a regular expression
context_lines: Number of context lines to include
Returns:
List of matches with file, line number, and text
Input Schema
Name | Required | Description | Default |
---|---|---|---|
case_sensitive | No | ||
context_lines | No | ||
file_pattern | No | ||
max_results | No | ||
pattern | Yes | ||
project | Yes | ||
use_regex | No | ||
whole_word | No |
Input Schema (JSON Schema)
{
"properties": {
"case_sensitive": {
"default": false,
"title": "Case Sensitive",
"type": "boolean"
},
"context_lines": {
"default": 2,
"title": "Context Lines",
"type": "integer"
},
"file_pattern": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "File Pattern"
},
"max_results": {
"default": 100,
"title": "Max Results",
"type": "integer"
},
"pattern": {
"title": "Pattern",
"type": "string"
},
"project": {
"title": "Project",
"type": "string"
},
"use_regex": {
"default": false,
"title": "Use Regex",
"type": "boolean"
},
"whole_word": {
"default": false,
"title": "Whole Word",
"type": "boolean"
}
},
"required": [
"project",
"pattern"
],
"title": "find_textArguments",
"type": "object"
}