Skip to main content
Glama

get_type_members

Retrieve methods, fields, and nested types for a Java type, with optional inherited-member inclusion and member-kind filtering.

Instructions

Get all members (methods, fields, nested types) of a specific type.

USAGE: Provide a type name to get all its members OUTPUT: Lists of methods, fields, and nested types with their details

Options:

  • includeInherited: Also include members from superclasses/interfaces

  • memberKind: Filter to "method" (constructors included), "field" or "type" only, compared case-insensitively. "field" returns every field, including static final constants and enum constants; each field's kind is field, constant or enumConstant. Any other value is rejected with INVALID_PARAMETER.

With includeInherited, unresolvedSupertypes, present only when there are any, names each supertype the compiler cannot resolve (a missing dependency), as the declaration writes it, with the type whose declaration names it: the members it would give are not listed.

Requires load_project to be called first.

Input Schema

NameRequiredDescriptionDefault
typeNameYesFully qualified or simple type name
memberKindNoFilter, case-insensitive: 'method', 'field' (every field, constants and enum constants included) or 'type'; omit for all
includeInheritedNoInclude inherited members (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.5.3
    • changedInput schema / properties / memberKind / description
      Previous value: -"Filter: 'method', 'field', 'type', or null for all"New value: +"Filter, case-insensitive: 'method', 'field' (every field, constants and enum constants included) or 'type'; omit for all"
  2. Addedv1.3.4
  3. Removedv1.3.3
  4. First observedv1.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and discloses useful details: case-insensitive memberKind filtering, rejection of invalid values with INVALID_PARAMETER, and unresolvedSupertypes behavior when includeInherited is set. It still does not explicitly state that the operation is read-only or whether it has side effects, but it covers most invocation-relevant behavior.

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 front-loaded with purpose and then organized into USAGE, OUTPUT, and Options sections. The unresolvedSupertypes paragraph is dense and somewhat awkwardly placed, but it contains relevant behavioral information for a tool without an output schema.

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?

Given no annotations and no output schema, the description is complete enough for correct invocation: it states the purpose, required load_project prerequisite, output shape, parameter filtering semantics, inherited-member behavior, and unresolved-supertype handling. An agent can select and call this tool without needing to infer missing critical details.

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 coverage is 100%, but the description adds substantial meaning beyond the schema: it clarifies that memberKind is case-insensitive, that 'method' includes constructors, that 'field' includes constants and enum constants, and that invalid values are rejected with INVALID_PARAMETER. It also explains the includeInherited behavior and the unresolvedSupertypes output detail.

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 gives a specific verb and resource: 'Get all members (methods, fields, nested types) of a specific type.' This clearly separates it from siblings like get_type_hierarchy or get_document_symbols, which address hierarchy or document scope rather than direct member enumeration.

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

Usage Guidelines3/5

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

It includes a short USAGE line, 'Provide a type name to get all its members,' and a prerequisite, 'Requires load_project to be called first.' However, it does not explain when to choose this tool over alternatives such as get_symbol_info or analyze_type.

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