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

get_types

Retrieve struct/enum declarations as C header text using name or path globs.

Instructions

Return matching struct/enum type declarations as C header text.

The `name` argument is a glob that matches either the datatype name or full
datatype path. Examples: `*`, `IMAGE_*`, `/my/category/Foo`.

Both direct structs/enums and typedefs that alias a struct/enum are
included, so normal C header style type names work as expected. Exported
enums also include comment directives like
`/* ghidra-mcp enum-size: Name=1 */` so enum storage sizes can be
round-tripped through `set_types()`.

Args:
    program: Required Ghidra project path or name to target.
    name: Glob used to match one or more types. `*` returns all supported
        types in the selected program.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo*
programYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly explains inclusion of typedefs, enum comment directives, and glob matching behavior. It does not explicitly state that the operation is read-only, but the verb 'Return' and the output format make that obvious. It lacks details on error handling or empty results, but these are minor gaps.

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

Conciseness4/5

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

The description is multi-paragraph but every sentence contributes value. It front-loads the core purpose, then elaborates on glob matching, inclusion behavior, and enum directives. While a bit verbose, it is well-structured and not wasteful.

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

Completeness4/5

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

Given the tool's moderate complexity and the presence of an output schema, the description covers the essential call parameters and behaviors. It explains the matching semantics and output format, which is sufficient for an agent to invoke it correctly. Missing explicit error handling is a minor gap.

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

Parameters3/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 thoroughly explains the 'name' parameter with glob examples and the '*' wildcard, but the 'program' parameter is only described as 'Required Ghidra project path or name to target' without elaboration on valid formats or how to discover it. This is partial compensation, not complete.

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 states a specific verb ('Return'), a specific resource ('struct/enum type declarations'), and the output format ('C header text'). It also clarifies the matching mechanism via globs, which distinguishes it from sibling tools like set_types that write types. The purpose is unmistakable.

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

Usage Guidelines2/5

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

The description implies this is the read counterpart to set_types by mentioning round-tripping enum sizes, but it does not explicitly state when to use this tool versus alternatives, nor does it give exclusions or conditions. An agent would have to infer usage from context rather than receive direct guidance.

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