find_symbol
Locate specific functions, classes, or methods in a codebase using fuzzy search. Input a root path and query to retrieve matching symbols for further analysis with what_breaks().
Instructions
🔍 STEP 2: Find specific functions, classes, or methods in the codebase.
USE THIS AFTER explore_repo() when you need to locate a specific piece of code. Uses fuzzy matching - you don't need the exact name!
INPUTS:
root_path: Same ABSOLUTE path used in explore_repo
query: What you're looking for (fuzzy search works!) Examples: "auth", "user service", "validate", "parseJSON"
EXAMPLE INPUTS: find_symbol("/Users/john/awesome-project", "authenticate") find_symbol("/Users/john/awesome-project", "user model") # Fuzzy matches "UserModel"
EXAMPLE OUTPUT: [ { "name": "authenticate_user", "type": "function", "path": "/Users/john/awesome-project/src/auth.py", "start_line": 45, "end_line": 67 }, { "name": "AuthService", "type": "class", "path": "/Users/john/awesome-project/src/services.py", "start_line": 12, "end_line": 89 } ]
RETURNS: List of symbol objects (dictionaries). Save these objects - you'll pass them to what_breaks()! Empty list if no matches found.
WHAT TO DO NEXT: Pick a symbol from the results and pass THE ENTIRE SYMBOL OBJECT to what_breaks() to see where it's used in the codebase.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
query | Yes | ||
root_path | Yes |