Skip to main content
Glama

Patch SSH File

unfour.ssh.patch_file

Apply a search/replace patch to a remote file via SSH and get a diff summary. Supports single-match patches in dev; protects prod with confirmation policies.

Instructions

Applies a small search/replace patch to a remote file through SSH and returns a diff summary without file content. Dev allows single-match project-file patches; test, system paths, or multi-match replacements require confirmation; prod is blocked by policy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
searchYes
confirmNo
replaceYes
timeoutMsNo
workspaceIdNo
connectionIdYes
confirmationTextNo
confirmation_textNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations are sparse (all hints false), so the description carries the burden of disclosing behavior. It states it returns a diff without file content, and explains confirmation requirements and prod blockage. This adds useful behavioral context beyond the annotations, though it doesn't detail side effects or error handling.

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 sentences, front-loaded with the primary purpose and then environment-specific rules. No filler or redundancy; every part adds value.

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?

Given the tool's complexity (9 params, output schema, environmental constraints), the description provides a solid high-level overview but lacks parameter semantics and fails to address edge cases like searches with no match or multiple matches beyond confirmation. The output schema covers return values, but the description doesn't explain the confirmation flow or the distinction between confirmationText and confirmation_text fields.

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

Parameters2/5

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

Schema description coverage is 0%, and the description does not explain any of the 9 parameters beyond indirectly mentioning search and replace. It fails to clarify the meaning of confirm, confirmationText, confirmation_text, timeoutMs, workspaceId, or connectionId, leaving the agent without guidance for these fields.

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 applies a small search/replace patch to a remote file via SSH and returns a diff summary. It uses a specific verb (applies) and resource (remote file via SSH), and distinguishes itself from sibling tools like unfour.ssh.write_file and unfour.ssh.read_file by focusing on patching rather than full writes or reads.

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?

The description provides environment-specific usage rules: dev allows single-match patches, test/system/multi-match require confirmation, prod is blocked. This gives clear context on when it's appropriate and when confirmation is needed, though it doesn't explicitly contrast with alternatives like write_file or exec.

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

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/zyqzyq/Unfour'

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