Skip to main content
Glama

roslyn:inline_variable

Replace variable declarations and usages with their assigned values to simplify code by eliminating unnecessary variables.

Instructions

Inline a variable, replacing all usages with its value.

USAGE: Position cursor on a variable declaration or usage. OUTPUT: Variable removed and all usages replaced with the expression. IMPORTANT: Uses ZERO-BASED coordinates (editor line - 1).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to source file
lineYesZero-based line number
columnYesZero-based column number
previewNoPreview mode (default: true)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the transformation effect and the coordinate system ('ZERO-BASED coordinates'), but doesn't mention potential side effects like breaking references, performance implications, or error conditions. It provides basic operational context but lacks depth about mutation risks.

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 well-structured with clear sections (purpose, usage, output, important note) and uses bullet-like formatting. Every sentence adds value, though the 'IMPORTANT' note could be integrated more smoothly. It's appropriately sized for the tool's complexity.

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

Completeness3/5

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

For a code transformation tool with no annotations and no output schema, the description provides adequate basic information about what the tool does and how to use it. However, it lacks details about error handling, what happens with complex variable scenarios, or the format of any potential output. Given the mutation nature of the tool, more behavioral context would be beneficial.

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 parameters thoroughly. The description adds minimal value beyond the schema - it mentions 'ZERO-BASED coordinates' which relates to the line/column parameters, but doesn't provide additional context about parameter interactions or usage patterns. This meets the baseline for high schema coverage.

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 specific action ('Inline a variable') and the effect ('replacing all usages with its value'). It distinguishes from sibling tools like 'extract_variable' by describing the opposite operation, making the purpose unambiguous and specific.

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?

The description provides clear usage context ('Position cursor on a variable declaration or usage') and explains the output behavior ('Variable removed and all usages replaced with the expression'). However, it doesn't explicitly state when NOT to use this tool or mention alternatives like 'extract_variable' for reverse operations.

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/sharplens-mcp'

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