Skip to main content
Glama

analyze_method

Analyze Java methods comprehensively by examining signatures, parameters, exceptions, call hierarchies, and override relationships in one operation.

Instructions

Comprehensive method analysis in a single call.

Combines:

  • Method info (signature, modifiers, return type)

  • Parameters with types

  • Declared exceptions

  • Incoming calls (who calls this method)

  • Outgoing calls (what this method calls)

  • Override information (super method, overriding methods)

Use this instead of multiple calls to get_method_at_position + call hierarchy tools.

IMPORTANT: Uses ZERO-BASED coordinates.

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to source file
lineYesZero-based line number
columnYesZero-based column number
maxCallersNoMaximum callers to return (default 20)
maxCalleesNoMaximum callees to return (default 50)
Behavior4/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It successfully communicates that this is a read-only analysis tool (implied by 'analysis'), specifies a prerequisite dependency ('Requires load_project'), and mentions coordinate system details. However, it doesn't address potential limitations like performance characteristics, error conditions, or what happens with invalid coordinates.

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: purpose statement, bulleted analysis components, usage guidance, technical constraint, and prerequisite. Every sentence earns its place, with no redundant information. The bulleted list makes the comprehensive scope immediately apparent.

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 5-parameter analysis tool with no annotations and no output schema, the description does well by explaining the comprehensive analysis scope, prerequisite requirement, and coordinate system. However, without an output schema, it could benefit from more detail about the return structure or analysis limitations to be fully complete.

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 100%, so the schema already documents all five parameters thoroughly. The description adds value by explaining the 'ZERO-BASED coordinates' constraint for line/column parameters and implying the comprehensive nature of analysis, but doesn't provide additional parameter semantics beyond what's in the schema descriptions.

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 method analysis in a single call' and lists six specific analysis components (method info, parameters, exceptions, incoming/outgoing calls, override information). It explicitly distinguishes itself from sibling tools by mentioning 'get_method_at_position + call hierarchy tools' as alternatives, showing clear differentiation.

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 provides explicit guidance on when to use this tool ('Use this instead of multiple calls to get_method_at_position + call hierarchy tools') and includes an important prerequisite ('Requires load_project to be called first'). It also specifies a technical constraint ('Uses ZERO-BASED coordinates') that affects usage.

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