Skip to main content
Glama

open_file

Open a file in the VS Code editor to view or edit it, particularly after creating a new file or applying changes via create_diff. Specify file path and project folder; optionally set view column, focus preservation, and preview mode.

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
targetProjectPathYesPath to the project folder we are working in
viewColumnNoThe view column to open the file in (1, 2, 3, etc.)
preserveFocusNoWhether to preserve focus on the current editor
previewNoWhether to open the file in preview mode
Behavior2/5

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

No annotations provided, so description carries full burden. Only states 'opening a file', with no details on side effects, error handling, or what happens if file doesn't exist. Minimal transparency.

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?

Two sentences, zero waste. Front-loaded with core purpose, then usage guidance. Efficient and clear.

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?

Given the simplicity of opening a file and rich schema (5 params fully described), the description is adequate but lacks details on return behavior or edge cases. Could improve but not severely lacking.

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 coverage is 100%, so baseline 3 applies. Description does not add meaning beyond schema, but schema already describes each parameter well.

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?

Clearly states it opens a file in VS Code editor, and distinguishes from siblings like open_project. Provides specific usage guidance for new files and after create_diff.

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?

Explicitly says when to use: for brand new files or after using create_diff on an existing file. Does not mention when not to use, but provides clear context.

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

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