Skip to main content
Glama

open_file

Open files in the VS Code editor for immediate viewing and editing. Use this tool to display newly created or modified files directly in the editor, ensuring easy access and workflow integration.

Instructions

Used to open a file in the VS Code editor. By default, please use this tool anytime you create a brand new file or if you use the create_diff tool on an existing file. We want to see changed and newly created files in the editor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the file to open
preserveFocusNoWhether to preserve focus on the current editor
previewNoWhether to open the file in preview mode
targetProjectPathYesPath to the project folder we are working in
viewColumnNoThe view column to open the file in (1, 2, 3, etc.)
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 mentions the tool opens files in VS Code and provides usage context, but doesn't describe potential side effects (e.g., focus changes, editor state), error conditions, or what happens if the file doesn't exist. It adds some behavioral context but leaves gaps for a mutation tool.

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 concise with two sentences that efficiently convey purpose and usage guidelines. Every sentence adds value without redundancy, and it's front-loaded with the core functionality followed by specific usage instructions.

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 tool with 5 parameters, 100% schema coverage, and no output schema, the description provides good purpose and usage context. However, as a mutation tool with no annotations, it could better address behavioral aspects like error handling or side effects to be fully 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?

Schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 since the schema does the heavy lifting.

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 ('open a file in the VS Code editor') and resource ('file'), distinguishing it from siblings like 'open_project' (which opens projects) or 'get_active_tabs' (which lists tabs). It provides explicit context about when to use it versus other tools.

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 explicitly states when to use this tool ('anytime you create a brand new file or if you use the create_diff tool on an existing file') and provides a clear alternative context ('We want to see changed and newly created files in the editor'), giving strong guidance on usage versus other tools.

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

Related 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/juehang/vscode-mcp-server'

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