mcp-server-tree-sitter

by wrale
MIT License
33
  • Apple
  • Linux

find_text

Search for specific text patterns, regex, or whole words in project files, with options for case sensitivity, file filtering, and context lines.

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

NameRequiredDescriptionDefault
case_sensitiveNo
context_linesNo
file_patternNo
max_resultsNo
patternYes
projectYes
use_regexNo
whole_wordNo

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" }
ID: k35mqkr8j9