find_wrapper_callers
Identifies wrapper classes that call driver methods, revealing the adapter/wrapper architecture in C/C++ codebases.
Instructions
Find C/C++ wrapper classes that call methods of a driver class —
libclang-powered adapter pattern detection. Traces method ownership
across class boundaries to reveal the wrapper/adapter architecture
(e.g. UART wraps UART_DRIVER). Text-based search cannot
distinguish which class owns each method call.
Returns wrapper methods grouped by wrapper class, showing which driver
methods each wrapper calls. Useful for understanding the adapter/wrapper
architecture (e.g. UART wraps UART_DRIVER).
For the reverse perspective — finding who calls a specific driver method
— use find_callers. For class member listing use
get_class_members.
Read-only. No side effects. Requires the reference index
(fw-context index — refs on by default).
Args:
class_name: Driver class name to find wrappers for.
E.g. 'UART_DRIVER' or 'hal::UART_DRIVER'.
project_root: Project root. Auto-detected if omitted.
limit: Maximum wrapper method results (default 50).
Returns: list of dicts, each with: wrapper_class (str), method_count (int), methods (list of dicts — each with method, qualified_name, kind, and calls (list of driver methods called)).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum wrapper method results (default 50). | |
| class_name | Yes | Driver class name to find wrappers for. E.g. 'UART_DRIVER' or 'hal::UART_DRIVER'. | |
| project_root | No | Project root. Auto-detected if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |