Skip to main content
Glama

ssh_upload

DestructiveIdempotent

Upload local files or directories to a server, verified by sha256 and never left half-written; replace the target entirely or merge to preserve existing data.

Instructions

Copies a local file or directory to a server, checked by sha256 on both sides and never left half-written at the target. A directory replaces the target whole — whatever was there and is not in the source is gone with it; merge: true keeps it instead. For text you can paste, ssh_file_write is cheaper; piping base64 through ssh_exec truncates silently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoOctal, one value for every file sent. Omit to keep local permissions.
sudoNoFor /etc, /opt and the like, and for setting an owner. Data stages in /tmp first — the machine needs room for a second copy. Default: false
mergeNoDirectories only. true = what the target holds and the source does not stays — uploads, .env, logs; same-named files are taken from the source. The tree is still put in place whole, by one rename. mode and owner then cover the kept files too. Default: false
ownerNo"root:root", every file and directory sent. Needs sudo; without it the answer says it was not applied.
verifyNosha256 on both sides, per file. "unavailable" = no sha256 on the machine = delivered, not broken. "mismatched" fails the call and replaces nothing. Default: true
profileYesMachine name.
timeoutNoMilliseconds. No ceiling by default — a transfer runs as long as it takes.
overwriteNofalse = refuse rather than replace, including when the target cannot be checked. A directory is judged whole, not per file. Default: true
recursiveNoOnly to force it — a directory is recognised on its own.
local_pathYesA file or a directory on this machine.
remote_pathYesWhere it goes on the server. A sent directory becomes this path itself and replaces it whole, not file by file — with merge: true what the source lacks stays.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
legendNoWhat the words in this answer mean. A key names the field before the value — "state=limited", "jobs[].state=lost" — and only the values this answer actually used are listed.

Schema Changelog

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

  1. Changed8 schema fields changedv2.3.3
    • addedInput schema / properties / merge
      Added value: +{
      +  "default": false,
      +  "description": "Directories only. true = what the target holds and the source does not stays — uploads, .env, logs; same-named files are taken from the source. The tree is still put in place whole, by one rename. mode and owner then cover the kept files too. Default: false",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / owner / description
      Previous value: -"\"root:root\", every file sent. Needs sudo; without it the answer says it was not applied."New value: +"\"root:root\", every file and directory sent. Needs sudo; without it the answer says it was not applied."
    • changedInput schema / properties / remote_path / description
      Previous value: -"Where it goes on the server. A sent directory becomes this path itself and replaces it whole, not file by file."New value: +"Where it goes on the server. A sent directory becomes this path itself and replaces it whole, not file by file — with merge: true what the source lacks stays."
    • changedInput schema / properties / sudo / description
      Previous value: -"For /etc, /opt and the like. Data stages in /tmp first — the machine needs room for a second copy. Default: false"New value: +"For /etc, /opt and the like, and for setting an owner. Data stages in /tmp first — the machine needs room for a second copy. Default: false"
    • changedInput schema / properties / verify / description
      Previous value: -"sha256 on both sides, per file. \"unavailable\" = no sha256 on the machine = delivered, not broken. Default: true"New value: +"sha256 on both sides, per file. \"unavailable\" = no sha256 on the machine = delivered, not broken. \"mismatched\" fails the call and replaces nothing. Default: true"
    • addedOutput schema / properties / files / items / properties / verified / description
      Added value: +"How the sha256 check ended, not whether the data landed — written says that. verified — sha256 was compared after the write and matched; mismatched — sha256 was compared and differed: nothing was replaced, and the path still holds what it held before; unavailable — the check had nothing to work with, and reason says what was missing; skipped — no comparison ran: none was asked for, or nothing landed to compare."
    • changedOutput schema / properties / files / items / properties / verified / enum
      Previous value: -[
      -  "verified",
      -  "unavailable",
      -  "skipped"
      -]New value: +[
      +  "verified",
      +  "mismatched",
      +  "unavailable",
      +  "skipped"
      +]
    • addedOutput schema / properties / files / items / properties / written / description
      Added value: +"Whether the data reached the path. Permissions and owner are a separate matter: one that did not apply is named in reason, and written stays true."
  2. Changed1 schema field changedv2.3.0
    • addedOutput schema / properties / legend / description
      Added value: +"What the words in this answer mean. A key names the field before the value — \"state=limited\", \"jobs[].state=lost\" — and only the values this answer actually used are listed."
  3. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the idempotentHint and destructiveHint annotations, the description discloses the critical behavior: sha256 verification on both sides, atomic writes that are never half-left, and full replacement of the target directory unless merge:true is set. This is substantive behavioral detail, not just a restatement of annotations.

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 sentences, each earning its place: the first states the action and key guarantees, the second clarifies the destructive directory behavior, and the third routes to an alternative. No wasted words.

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?

Given the rich parameter schema, the output schema, and annotations, the description covers the essential operational invariants: atomicity, verification, destructive replacement, and the relevant alternative. Nothing needed to correctly invoke the tool is missing.

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

Parameters4/5

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

The schema already covers all 11 parameters richly, so the baseline is 3. The description adds cross-cutting meaning not obvious from individual parameters: the transfer is atomic, directories replace the target whole, and verification is built in. This is useful, but the per-parameter semantic burden is largely carried by the 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: 'Copies a local file or directory to a server.' It also distinguishes itself from siblings by noting that ssh_file_write is cheaper for pasteable text, making the tool's role clear against the other SSH tools.

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?

The description explicitly gives a decision rule: for text you can paste, use ssh_file_write instead, and warns that piping base64 through ssh_exec truncates silently. This tells an agent when not to use this tool and which sibling to prefer.

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/hypnosis/ssh-mcp-server'

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