Skip to main content
Glama

repo_write_file

Writes or updates a file in the project workspace, creating missing parent directories so autonomous code changes land in the correct location.

Instructions

Safely writes or updates a file within the project workspace, ensuring parent directories exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesFull content to write to the file
filePathYesRelative path to the file within the repository
workspaceRootNoOptional custom workspace root directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses that parent directories are created automatically and that existing files are updated, but it omits overwrite risk, permission requirements, and what the operation returns. The word 'safely' is asserted without substantiation.

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?

A single well-formed sentence with no wasted clauses, and the action is front-loaded. The vague qualifier 'Safely' is the only filler, but it does not bloat the sentence.

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 mutation tool with no annotations and no output schema, the description is only partially complete: it covers directory creation but says nothing about overwrite semantics, failure modes, or permissions. Adequate to call the tool, thin for a write operation.

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 all three parameters (content, filePath, workspaceRoot) are already documented in the schema. The description adds no path-format or content constraints beyond what the schema states, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('writes or updates') and resource ('a file within the project workspace'), which clearly separates it from repo_read_file and repo_delete_file by name. It does not explicitly name siblings or scope boundaries, but the core purpose is unambiguous.

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?

There is no guidance on when to use this versus alternatives (e.g., terminal_exec, or a create-style sibling), nor any prerequisites or when-not-to-use conditions. The agent must infer usage purely from the name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.