Skip to main content
Glama
murzirius

VPS-Guardian-MCP

by murzirius

write_file_content

Write or update configuration files in authorized directories, creating a timestamped backup before overwriting to ensure safe changes.

Instructions

Atomically write or update a configuration file within authorized directories.

Creates an automatic timestamped backup (.bak.) before overwriting. Permitted directories: /etc/nginx/, /etc/mysql/, /etc/postgresql/, /etc/docker/, /etc/caddy/, /var/www/

Args: file_path: Path to the target configuration file. content: Text content to write. backup: Create a backup file before writing (default: True).

Returns: JSON string indicating write status and backup location.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backupNo
contentYes
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.1

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and uses it well: it discloses atomic write behavior, creation of a timestamped backup before overwriting, optional backup via the backup parameter, authorized directory restrictions, and the JSON return format. The potentially destructive overwrite is revealed with mitigations rather than hidden.

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 compact, front-loaded with the core behavior, and then formatted into scope, parameters, and return sections. No filler sentences; each line adds needed information.

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?

For a three-parameter mutation tool, the description covers what the tool does, where it may act, what side effects occur, what the parameters mean, and what the caller receives. There is no destructive ambiguity or missing critical input needed to invoke it.

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

Parameters5/5

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

Schema description coverage is 0%, but the description documents all three parameters with meaningful details: file_path as the target path, content as text to write, and backup with its default behavior. This more than compensates for the barren input schema.

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 opens with a specific verb and resource: 'Atomically write or update a configuration file within authorized directories.' This clearly distinguishes it from read-only siblings like view_file_content and list_directory, and the permitted-directory list narrows its scope further.

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?

It states the tool is for writing or updating configuration files and explicitly enumerates permitted directories, which gives an agent clear conditions for use and exclusion (anything outside those directories). It does not name alternative tools or explicitly say when-not-to-use, but the scope is concrete enough to route selection.

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