Skip to main content
Glama

inline

Replace a method, variable, or parameter at a given LSP position with its definition or value. Detects the symbol kind automatically and offers dry-run preview before applying edits.

Instructions

Inline the method, variable, or parameter at a Position — the server detects which kind, so just point at the name (0-based LSP line/character, UTF-16 units). Methods and variables: every certain use is replaced by the body or value; remove_definition=false keeps the definition; only_current_occurrence=true inlines just the occurrence at the Position. Parameters: the default value is written into call sites that omit it. Defaults to a Dry Run preview; set apply=true to write. Supply expected_symbol when edits may have intervened since your LSP answer, so a stale Position fails safely instead of inlining the wrong thing. Locate the definition with your LSP first; this tool only changes code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
lineYes
rootNo
applyNo
characterYes
expected_symbolNo
remove_definitionNo
only_current_occurrenceNo
in_docstrings_and_commentsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully discloses behavior: dry-run default, apply semantics, remove_definition behavior, only_current_occurrence, parameter inlining (default value written into call sites), and expected_symbol as a safety mechanism. This exceeds typical transparency and leaves little ambiguity about the tool's effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph, but every sentence earns its place—covering core purpose, per-kind behavior, dry-run/apply, safety, and a closing instruction. It is somewhat long but not wasteful; slight structure improvement (e.g., bullets) would make it a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex refactoring tool with 9 parameters and no annotations, the description covers all major behavioral aspects: dry-run vs. apply, handling of methods/variables vs. parameters, safety with expected_symbol, and the LSP workflow. With an output schema present, return-value details can reside there, so this description is highly complete.

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 0%, so the description must explain parameters. It explains line/character coordinate format (0-based LSP, UTF-16), apply, remove_definition, only_current_occurrence, and expected_symbol. However, it omits root and in_docstrings_and_comments, leaving those less clear. Given the high parameter count, this is a solid but not perfect compensation.

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 function: 'Inline the method, variable, or parameter at a Position'. It names the specific verb (inline), the resource types, and the positional targeting, distinguishing it from siblings like rename, move, and extract_method.

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 concrete usage context: 'Defaults to a Dry Run preview; set apply=true to write' and the prerequisite 'Locate the definition with your LSP first; this tool only changes code.' It also advises using expected_symbol for stale positions, which is a clear when-to-use guideline. It doesn't explicitly discuss when not to use the tool or name alternatives, so it's a 4 rather than a 5.

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/andrewesweet/ropey'

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