Skip to main content
Glama

inline_method

Replace a method call with its body by positioning the cursor on the call. Returns a text edit to apply the inlining.

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
columnYesZero-based column number (on method name)
lineYesZero-based line number of method call
filePathYesPath to source file containing the method call
Behavior5/5

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

With no annotations, the description fully discloses behavior: it returns a text edit, uses zero-based coordinates, lists limitations (same project, simple methods, multiple returns), and specifies the prerequisite load_project. This is comprehensive for a tool of this type.

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 well-structured with clear sections (main, usage, output, important note, limitations, prerequisite). It is concise and front-loads the primary purpose, with each sentence adding value.

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?

The description covers the output (text edit) and limitations, which compensates for the lack of an output schema. It might have included information about undo behavior, but overall it is sufficiently complete for a refactoring tool.

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 input schema covers all three parameters with clear descriptions (filePath, line, column) and 100% coverage. The description reiterates zero-based coordinates and usage but does not add new semantic meaning beyond what the schema provides.

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 verb 'Inline' and the resource 'method call', specifying the action of replacing a call with the method body. It distinguishes itself from siblings like 'inline_variable' by focusing on method calls.

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?

Explicit usage guidance is provided: 'Position cursor on a method call' and 'Requires load_project to be called first.' Limitations are listed, but no explicit when-not-to-use or alternatives are given, though the context implies it's for simple methods.

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