Skip to main content
Glama

files/update

Modify file contents programmatically by appending text or replacing specific line ranges. Designed for automated editing on Linux.

Instructions

Programmatically edit a file by appending text or replacing specific line ranges.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file to edit
appendNoIf true, appends the content to the end of the file
contentYesText content to insert or append
end_lineNoEnd of the line range to replace (inclusive)
privilegedNoSet to true to edit as root
start_lineNoStart of the line range to replace (1-indexed)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations are absent, so the description carries the behavioral burden. It does disclose the two mutating behaviors (append vs range replacement), but it leaves out side effects, permission requirements despite the 'privileged' parameter, and behavior for missing files or invalid ranges.

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?

One front-loaded sentence states the core action first and then the two supported modes. Every phrase contributes; 'programmatically' is slightly redundant but not harmful.

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 6-parameter mutation tool with no annotations or output schema, the description is reasonably complete at a high level, and full parameter descriptions fill in details. However, it does not clarify whether append and line-range replacement are mutually exclusive or what the default behavior is when no range is provided, leaving clear gaps.

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 a high-level mapping of append to append mode and start_line/end_line to range replacement, but it does not explain parameter combinations or required relationships, so it stays at baseline.

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 uses a specific verb ('edit'), names the resource ('a file'), and differentiates the operation by listing two concrete modes: appending text and replacing line ranges. This clearly separates it from siblings like files/create, files/read, or files/list.

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

Usage Guidelines3/5

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

The usage context is implied rather than explicit: editing existing files belongs here, while creating new files belongs elsewhere. However, no alternatives are named and no when-not-to-use guidance is provided, so an agent must infer the tool's place among siblings.

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