Skip to main content
Glama
user-ic

vscode-editor-mcp

by user-ic

Get VS Code editor selection

get_selection

Retrieve the active file's name, path, and current selection line ranges from VS Code. Uses 1-based numbering to give coding agents precise editor context.

Instructions

Returns the name and path of the file open in VS Code's active editor along with the line range(s) of the current selection(s). Line and character numbers are 1-based.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It notes 1-based line/character numbers, which is useful, but does not mention behavior when no file is open or no selection exists, nor whether it is read-only. Partially transparent.

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 a single, well-structured sentence that front-loads the key information (what is returned) and adds the 1-based detail without fluff. Every word earns its place.

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?

No output schema exists, so the description must explain return values. It does so at a high level but lacks the exact structure (e.g., object fields, array format) needed for an agent to reliably consume the result. Edge cases like 'no active editor' are also unaddressed.

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?

The tool has zero parameters, so the schema fully covers parameter semantics. Baseline is 4, and the description adds no misleading or unnecessary parameter information.

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 explicitly states the tool returns the file name/path and line ranges of selections, with a specific verb ('Returns') and resource ('VS Code's active editor'). It is unambiguous and distinct from potential sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (when you need the current editor selection) but provides no explicit when-to-use statement, alternatives, or exclusions. For a simple getter with no siblings, the context is clear but not fully explicit.

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/user-ic/vscode_mcp'

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