Skip to main content
Glama

inline_method

Replace a method call with its body to simplify Java code. Requires source availability and works best with straightforward methods.

Instructions

Inline a method call by replacing it with the method body.

Returns the text edit needed to inline the method call. The caller should apply this edit to perform the inlining.

USAGE: Position cursor on a method call OUTPUT: Edit to replace call with method body

IMPORTANT: Uses ZERO-BASED coordinates.

LIMITATIONS:

  • Method must be in the same project (source available)

  • Works best with simple methods (no complex control flow)

  • Single return statement is handled, multiple returns may need review

Requires load_project to be called first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to source file containing the method call
lineYesZero-based line number of method call
columnYesZero-based column number (on method name)
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it returns a text edit rather than performing the edit directly, uses zero-based coordinates, has specific limitations about method complexity and project scope, and has a prerequisite (load_project). It doesn't cover all possible edge cases but provides substantial operational context.

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 perfectly structured with clear sections: purpose statement, output explanation, usage instructions, coordinate system note, limitations, and prerequisites. Every sentence serves a distinct purpose with zero wasted words, and critical information is front-loaded appropriately.

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 mutation tool with no annotations and no output schema, the description provides substantial context: clear purpose, usage prerequisites, limitations, and behavioral expectations. It explains what the tool returns (text edit) and how to use it. The main gap is lack of output format details, but given the tool's focused scope, the description is largely 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?

With 100% schema description coverage, the baseline is 3. The description adds minimal parameter-specific context beyond the schema - it mentions 'Position cursor on a method call' which relates to the line/column parameters, and 'Method must be in the same project' which relates to filePath, but doesn't provide additional syntax or format details. The schema already documents all three parameters adequately.

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's purpose with specific verbs ('inline a method call', 'replacing it with the method body') and distinguishes it from siblings like 'extract_method' or 'inline_variable'. It explicitly identifies the resource being acted upon (method calls) and the transformation performed.

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 usage instructions: 'Position cursor on a method call' and 'Requires load_project to be called first'. It also distinguishes when NOT to use it through limitations like 'Method must be in the same project' and 'Works best with simple methods', giving clear boundaries for appropriate application.

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