get_template_instances
Retrieve all concrete instantiations of a C++ class or function template, including their full type signatures and the template declaration.
Instructions
Read-only. Find all template instantiations for a given class or function template.
Returns concrete instantiations of the template — each with its full type
signature (e.g. Callback<void(int)>). The template declaration itself
is also returned as the first result when found.
Uses the template_usr column populated during indexing via libclang's
cursor.specialized_template.
Returns: list[dict] with one element wrapping the template declaration: {name, qualified_name, kind, file, line, is_definition, signature, instances (list of dicts, each with name, qualified_name, kind, file, line, signature, is_definition), instance_count (int)}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results (default 50). | |
| project_root | No | Project root. Auto-detected if omitted. | |
| template_name | Yes | Template name to find instantiations for. E.g. 'Callback' or 'mbed::Callback'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |