Skip to main content
Glama

find_method_references

Find all method reference expressions (e.g., Foo::bar) in Java source code, showing where a method is used as a lambda-style reference for refactoring and pattern analysis.

Instructions

Find all method reference expressions (Foo::bar lambda syntax).

JDT-UNIQUE: This fine-grained search is not available in LSP.

USAGE: Position on a method, or provide method details OUTPUT: All locations where the method is used as a method reference

Useful for:

  • Understanding functional programming patterns

  • Finding lambda-style usages of methods

  • Refactoring analysis

IMPORTANT: Uses ZERO-BASED coordinates.

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to source file containing the method
lineYesZero-based line number of the method
columnYesZero-based column number
maxResultsNoMaximum results to return (default 100)
Behavior3/5

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

Discloses ZERO-BASED coordinates and prerequisite, but with no annotations provided, more behavioral details (e.g., return format, side effects) would be beneficial. Adequate but not exhaustive.

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?

Efficiently structured with purpose, usage, output, use cases, important note, and prerequisite. No wasted words, front-loaded key information.

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?

Covers essential aspects for a search tool: what it finds, how to use, coordinate system, prerequisite. Missing return format or example, but acceptable given no output schema.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. Description adds value by clarifying zero-based nature of line and column, and default for maxResults, enhancing understanding beyond 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?

Clearly states it finds method reference expressions (Foo::bar syntax), and distinguishes from siblings like find_references by noting JDT-UNIQUE and fine-grained nature.

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?

Provides explicit usage instructions (position on method or provide details) and prerequisite (load_project). Lists use cases but does not explicitly state when not to use or compare to alternatives.

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