get_subclasses
Discover all subclasses of a given class recursively to assess the impact of interface changes and determine which code needs updating.
Instructions
Find all classes that extend a given class, recursively.
Use this to understand the impact of changing a class's interface: which subclasses would need updating?
Supports multi-level inheritance trees up to the specified depth.
When the codebase has multiple classes sharing class_name (e.g.
Django defines Field in both contrib/gis/gdal/field.py and
db/models/fields/__init__.py), pass file_path to pick the
intended definition. Without it, the first match wins and the
response includes ambiguous: True plus a candidates list so
you can retry.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"class_name": "<class_name>"
},
"name": "get_subclasses"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | How many inheritance levels to traverse (1 = direct only). | |
| file_path | No | When ambiguous, pick the definition in this file. Substring match is NOT done — pass the exact path Grafyx reports in the ``candidates`` list of an ambiguous response. | |
| class_name | Yes | Name of the base class to find subclasses of. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||