Skip to main content
Glama
rj9884
by rj9884

edit_file

Replace a file's entire content with new text, automatically creating a timestamped backup before any change. Use for full rewrites; choose patch_file for precise edits.

Instructions

Write new content to a file, replacing it entirely. A timestamped backup is automatically created in .mcp-backups/ before any change. Use patch_file instead when making a small targeted change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe complete new content to write to the file
filepathYesPath to the file, relative to project root or absolute
create_if_missingNoCreate the file if it does not exist yet
Behavior4/5

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

With no annotations, the description carries the full transparency burden. It clearly discloses that the tool replaces the entire file and that a timestamped backup is created in .mcp-backups/ before changes, which is crucial behavioral context. It does not mention permissions or failure handling, but the core destructive nature is well covered.

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 two concise sentences, front-loaded with the core purpose, followed by the backup behavior and an explicit alternative. No filler words; every sentence adds value.

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

Completeness5/5

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

The description is complete for a file-write tool: it covers the operation, the destructive replacement behavior, the backup mechanism, and the preferred alternative for targeted edits. There is no output schema, but none is needed here; all important context is provided.

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 baseline is 3. The description adds no new parameter details beyond the schema, but it reinforces that 'content' is the complete new content, and the schema already documents all three properties adequately.

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 tool's function: 'Write new content to a file, replacing it entirely.' It names the verb, resource, and scope, and explicitly contrasts with patch_file for small targeted changes, distinguishing it from siblings.

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?

Provides explicit guidance: 'Use patch_file instead when making a small targeted change.' This tells the agent when to choose an alternative, fulfilling the key usage guideline requirement.

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/rj9884/universal-dev-mcp'

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