Skip to content

Tool: search_text

Description: Search for a text pattern in all files within a directory and return matching lines. Respects .gitignore.

Argument Type Description
paths str String of one or more paths (space-separated) to search in. Each path can be a directory or a filename.
pattern str Regex pattern or plain text substring to search for in files. Tries regex first, falls back to substring if regex is invalid.
recursive bool Whether to search recursively in subdirectories (directories only). Defaults to True.
Returns str Matching lines from files as a newline-separated string, or warning if pattern is empty.

Example usage: search_text(paths="src", pattern="def ", recursive=True)


generated by janito.dev