find_referencing_symbols
Locate and retrieve metadata for all symbols referencing a specific target symbol in code, including short code snippets around each reference, to analyze and trace dependencies efficiently.
Instructions
Finds references to the symbol at the given name_path
. The result will contain metadata about the referencing symbols
as well as a short code snippet around the reference. Returns a list of JSON objects with the symbols referencing the requested symbol.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
exclude_kinds | No | Same as in the `find_symbol` tool. | |
include_kinds | No | Same as in the `find_symbol` tool. | |
max_answer_chars | No | Same as in the `find_symbol` tool. | |
name_path | Yes | For finding the symbol to find references for, same logic as in the `find_symbol` tool. | |
relative_path | Yes | The relative path to the file containing the symbol for which to find references. Note that here you can't pass a directory but must pass a file. |
Input Schema (JSON Schema)
{
"properties": {
"exclude_kinds": {
"default": [],
"description": "Same as in the `find_symbol` tool.",
"items": {
"type": "integer"
},
"title": "Exclude Kinds",
"type": "array"
},
"include_kinds": {
"default": [],
"description": "Same as in the `find_symbol` tool.",
"items": {
"type": "integer"
},
"title": "Include Kinds",
"type": "array"
},
"max_answer_chars": {
"default": 200000,
"description": "Same as in the `find_symbol` tool.",
"title": "Max Answer Chars",
"type": "integer"
},
"name_path": {
"description": "For finding the symbol to find references for, same logic as in the `find_symbol` tool.",
"title": "Name Path",
"type": "string"
},
"relative_path": {
"description": "The relative path to the file containing the symbol for which to find references.\nNote that here you can't pass a directory but must pass a file.",
"title": "Relative Path",
"type": "string"
}
},
"required": [
"name_path",
"relative_path"
],
"title": "applyArguments",
"type": "object"
}