Skip to main content
Glama
I-CAN-hack
by I-CAN-hack

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

TableJSON Schema
NameRequiredDescriptionDefault
kindNouser
filterNo*
programYes
namespaceNo*

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully carries the burden of behavioral disclosure. It explains the response format (JSON with specific fields), the source of namespace data (real Ghidra Namespace object), filter semantics (glob vs substring), and the meaning of 'kind' values. It is thorough and leaves no ambiguity about what the tool does or returns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for response details, filter behavior, and arguments. It is longer than average but every sentence adds value; there is no fluff. The most critical information (what it does, filter behavior) is front-loaded, and the format is easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is complete for an agent to correctly invoke the tool. It covers the response format, parameter details, filtering behavior, and the distinction between user labels and functions. Despite having an output schema, it still explains return fields in detail, ensuring the agent knows what to expect. No essential information is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does so comprehensively: 'program' is the required target, 'filter' is explained with glob and substring rules, 'kind' is defined with its three options, and 'namespace' is described with match behavior and examples. Every parameter is given meaningful semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's verb ('Get') and resource ('matching labels or functions in the selected program'). It distinguishes itself from siblings by covering both labels and functions, and from tools like 'rename' or 'namespaces' by its query/filter nature. The purpose is unambiguous and specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context, such as using namespace filters to list a class's methods and explaining the three 'kind' options (user, functions, all). It does not explicitly name alternatives or say 'use this instead of X', but the context of sibling tools makes the tool's role obvious. It lacks explicit exclusions but gives strong guidance on when to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.