Skip to main content
Glama

write_file

Write or update files directly in the VS Code workspace by specifying a path and content. Enables agents to create or modify project files while respecting workspace restrictions.

Instructions

Write a file inside the VS Code workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only says 'write a file' without specifying whether it creates new files or overwrites existing ones, how path resolution works, or any error conditions. The workspace constraint adds some context but falls short of disclosing the mutation behavior.

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 sentence with no redundant wording, making it concise and front-loaded. However, it is under-specified for a mutation tool, so it could be slightly expanded without becoming wordy.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical information about overwrite behavior, path resolution, and what happens on success or failure. The low complexity of the tool does not excuse the absence of these details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has no parameter descriptions and 0% coverage, so the description must compensate. It provides no explanation of what 'path' is relative to, whether 'content' is written exactly as provided, or any other parameter semantics. The agent must infer everything from parameter names.

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 action (write a file) and the resource (file inside the VS Code workspace). It distinguishes from sibling tools like read_file and list_files, which have clearly different purposes.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It does not mention when to use write_file instead of read_file or ask_ai, nor any prerequisites or restrictions.

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/relr-prog/mcp-agent-to-vsc'

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