Skip to main content
Glama
irfanfath123

homelab-monitor-mcp

by irfanfath123

edit_file

Replace exact text in a file on a local or remote homelab host; the target text must occur once and client approval is required.

Instructions

Replace text in a file. WRITE action — your MCP client will ask for approval before running it. old_text must occur exactly once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoServer name from HOMELAB_HOSTS (e.g. 'sil-baru'). Omit to run on the local machine.
pathYesAbsolute path inside HOMELAB_PROJECT_DIRS (e.g. '/home/user/projects/api')
new_textYesReplacement text
old_textYesExact text to find (must occur exactly once)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose the important traits: it is a WRITE action, the client will prompt for approval, and old_text must occur exactly once. It omits what happens on failure (zero or multiple matches), whether edits are atomic/reversible, and any permission or path-allowlist constraints beyond the schema's note.

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?

Three short sentences with zero filler, and the operation plus its uniqueness constraint are front-loaded. Every sentence earns its place.

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

Completeness4/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 covers the essentials: what it does, that it is a guarded write, and the single-match precondition. Failure behavior and reversibility are the only meaningful gaps remaining.

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 four parameters are already documented, including the 'must occur exactly once' constraint that the description repeats. The description adds no syntax or format detail beyond the schema, making the baseline 3 appropriate.

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 and resource ('Replace text in a file'), which is unambiguous and clearly distinct from siblings like read_file or docker_logs. It does not explicitly name an alternative tool, but the purpose itself is sharp enough that no confusion arises.

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 choose this over alternatives such as run_command (e.g. sed) or a hypothetical write_file, nor any stated prerequisites like needing a unique anchor. Usage is only implied by the description of the operation.

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