Skip to main content
Glama

host_copy

Copy files or directories from one host to many over SSH, with dry-run size/SHA-256 plans, target backups, and optional KEY=value edits for one env file.

Instructions

Copy files or directories from one host to others through this machine (certificates, /opt/remnanode/docker-compose.yml with the node key, /etc/log-upload/secrets.env, haproxy.cfg …): what the owner did by hand when moving an ingress or cloning a node. Contents are never shown: the plan lists size and sha256 on the source and on each target. Existing target paths are archived to /root/mia-backup-.tgz first. For one env-style file, set changes KEY=value lines on the way (e.g. LOG_NODE_NAME).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
setNoonly with one file: KEY=value lines to set
fromYessource host (inventory)
modeNochmod for copied files, e.g. 600
applyNofalse (default) = dry run: show what will happen on which hosts and a planHash. true = run it; needs planHash
batchNohosts at a time (rolling). Default depends on the action: 1 for disruptive ones
pathsYes
targetYesdestination hosts: hosts: all | <host> | <glob nl-*> | <group> | role:<edge|remnanode|panel|docker> | tag:<tag>; comma-separated, !x excludes
planHashNoplanHash from the dry run of the very same call, good for one apply; refused if targets or their state changed since
continueOnErrorNokeep going after a host fails (default: stop the rollout at the first failure)
skipUnreachableNoskip hosts that do not answer over ssh instead of refusing the whole plan (they show as skipped)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden and does well: it states contents are never displayed, that a plan reports sha256/size on source and each target, that existing targets are archived to /root/mia-backup-<time>.tgz beforehand, and that dry-run/apply gates on a planHash. It omits auth/permission requirements and how the relay connection is established, leaving a small gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the verb and resource, then layers safety behavior and the `set` special case. The long parenthetical enumerating example paths is dense but informative; the run-on first sentence is slightly heavy, but every clause carries operational meaning.

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 10-parameter, no-output-schema mutation tool, it covers the destructive/backup behavior, dry-run workflow, hashing, and the file-transformation caveat. Return-format detail is largely unnecessary since no output schema exists, though the plan/apply lifecycle could be spelled out a bit more.

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 90%, so the baseline is 3. The description only adds meaning for `set` (KEY=value lines changed on the way, with a LOG_NODE_NAME example) and touches planHash validity; the other parameters are already fully explained by the schema, so little net value is added.

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?

States a specific verb (copy) and resource (files/directories) with explicit scope: from one host to others, relayed through this machine. Distinguishes it from the many read/edit siblings (host_file_read, host_file_edit) by describing a multi-host push operation and by enumerating the exact config paths it is meant for.

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?

Gives clear situational context (the manual work done 'when moving an ingress or cloning a node'), which tells the agent when this tool applies. It does not name alternatives or explicit exclusions (e.g., single-host editing vs host_file_edit), so it falls short of a 5.

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