Skip to main content
Glama

analyze_type

Analyze Java types comprehensively by retrieving type information, members, hierarchy, and usage data in a single call to simplify code understanding.

Instructions

Comprehensive type analysis in a single call.

Combines:

  • Type info (name, kind, modifiers, location)

  • All members (methods, fields, constructors)

  • Type hierarchy (superclass, interfaces, subtypes)

  • Usage summary (instantiations, casts, etc.)

  • Diagnostics for the type's file

Use this instead of multiple calls to get_type_members + get_type_hierarchy + get_type_usage_summary.

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNameYesFully qualified or simple type name
includeUsagesNoInclude usage analysis (default true)
maxUsagesNoMax usages per category (default 10)
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 effectively describes what the tool does (comprehensive analysis combining multiple aspects), mentions it's a single call operation, and specifies a prerequisite. However, it doesn't mention performance characteristics, rate limits, or what happens with invalid inputs, leaving some behavioral aspects uncovered.

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 efficiently structured with clear sections: a summary statement, bulleted list of what it combines, usage guidance, and prerequisite. Every sentence earns its place, and the information is front-loaded with the most important details first.

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?

For a tool with 3 parameters, 100% schema coverage, but no output schema or annotations, the description does well by explaining what the tool returns (the combined analysis results) and when to use it. However, without an output schema, some additional detail about the return format would be helpful, though the description of what's included gives reasonable context.

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?

The schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline expectation but doesn't provide additional semantic context about the parameters.

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 performs 'comprehensive type analysis in a single call' and enumerates exactly what it combines: type info, all members, type hierarchy, usage summary, and diagnostics. It specifically distinguishes itself from sibling tools like get_type_members, get_type_hierarchy, and get_type_usage_summary by being a combined alternative.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('Use this instead of multiple calls to get_type_members + get_type_hierarchy + get_type_usage_summary') and provides a clear prerequisite ('Requires load_project to be called first'). This gives specific guidance on both tool selection and necessary preconditions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pzalutski-pixel/javalens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server