labels
Find symbols and functions in a Ghidra program by name, address, or namespace, returning qualified names, types, and addresses for analysis.
Instructions
Get matching labels or functions in the selected program.
The response is JSON containing the matched labels with their short names,
qualified namespace paths, symbol types, addresses, and function
signatures when applicable. Global data labels also include their
datatype.
Each entry also reports `namespace` (the qualified parent namespace, or
null for global symbols) and `namespace_type` (e.g. `Class`, `Namespace`,
`Function`, or `GLOBAL`). These come from the real Ghidra `Namespace`
object, so C++ class membership is reported accurately. Use this to list a
class's methods, e.g. `namespace="MyClass"` or `namespace="ns::*"`.
`kind="user"` returns user-defined symbols only. `kind="functions"` returns
all discovered functions, including analysis-created default names.
`kind="all"` returns both user-defined symbols and all functions.
Filter behavior (applies to both `filter` and `namespace`):
- `*` returns all labels
- If the value contains glob metacharacters (`*`, `?`, `[]`), glob matching
is applied
- Otherwise, the value is treated as a case-sensitive substring
`filter` is matched against the symbol name, qualified name, and address.
`namespace` is matched against the qualified parent namespace.
Args:
program: Required Ghidra project path or name to target.
filter: Label filter expression. `*` returns all labels.
kind: One of `user`, `functions`, or `all`.
namespace: Parent-namespace filter. `*` returns labels in any
namespace. Match against the qualified namespace, e.g. `MyClass`.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | user | |
| filter | No | * | |
| program | Yes | ||
| namespace | No | * |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |