find_symbol
Search the symbol index to locate PHP classes, interfaces, traits, enums, or methods by name. Returns file paths and line numbers for direct code access.
Instructions
Search the symbol index for a PHP class, interface, trait, enum, or method.
Returns file paths and line numbers — use the result directly with read_code_context to inspect the implementation.
Requires build_index to have been run at least once.
Args: name: Name to search for (case-insensitive substring or full name). Examples: "UserController", "UserRepo", "findByEmail", "App\Entity" kind: Optional filter. One of: class, interface, trait, enum, method. Empty = search all symbol types.
Typical workflow:
build_index — index the project (once, or after big changes)
find_symbol "Foo" — locate the file and line
read_code_context — read the file for full implementation
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| kind | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |