get_symbol_usages
Locate all usages of a specified symbol in a repository, applying optional filters by symbol type and file path substrings to narrow results.
Instructions
Run kit usages <repo> <symbol_name> and optionally filter by symbol type
at the CLI level and then post-filter the rows by file inclusion/exclusion
substrings.
Parameters
repo : str | Path
Path or name passed to kit usages. Use full absolute path.
symbol_name_or_substring : str
The symbol whose usages we want to inspect, or a substring of the symbol name (which can be used to find multiple symbols which share a naming convention).
working_directory : str
Directory from which to run the command (absolute path).
symbol_type : str | None
"function" or "method" or "class"
file_must_contain : str | None
post-filter: Keep only rows whose File column contains this substring.
None ⇒ no inclusion filter.
file_must_not_contain : str | None
post-filter: Discard rows whose File column contains this substring.
None ⇒ no exclusion filter.
Returns
list[str] | str
Filtered output, ready to print() or write to a file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| symbol_type | No | ||
| file_must_contain | No | ||
| working_directory | Yes | ||
| file_must_not_contain | No | ||
| symbol_name_or_substring | Yes |