Skip to main content

Module search_tools

Module search_tools 

Source

Functions§

glob_files
List files matching a glob pattern. Returns sorted relative paths.
search_available
Returns true when web search is available: either BRAVE_API_KEY or SERP_API_KEY is set in the environment. Web search is provider-agnostic — the user must supply their own search API key.
search_codebase
Search workspace with optional glob filter (e.g. "*.py") and context lines.
search_codebase_filtered
search_in_file
Search a single file for a regex pattern, returning matching lines with optional context. Marks matching lines with >.
search_web
Perform a web search using whichever API key is available. Brave takes priority over SerpAPI if both are set.