Skip to main content
Glama

repo_script

Execute scripts from a local repo checkout on fleet hosts via SSH, showing a dry-run plan before applying changes.

Instructions

Run one of your own fleet scripts from a local repo checkout (MIA_REPOS, e.g. ops=~/src/ops-scripts) on hosts: deploy/migrate-blacklist.sh, lock-mgmt-ports-apply.sh, install-beszel.sh … The script (plus files listed in with, same relative paths) is sent over ssh, run as root from a temp dir, then removed. Exactly the checked-out version runs: the plan shows the commit, uncommitted changes and a hash of the files. Secrets go by env var name (envFrom): the value is read from mia's own environment and never shown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNonon-secret variables
argsNo
repoNorepo name from MIA_REPOSops
withNoother repo files the script reads (relative paths are kept)
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
scriptYespath inside the repo, e.g. deploy/migrate-blacklist.sh
targetYeshosts: all | <host> | <glob nl-*> | <group> | role:<edge|remnanode|panel|docker> | tag:<tag>; comma-separated, !x excludes
envFromNonames of variables to pass from mia's environment (secrets)
planHashNoplanHash from the dry run of the very same call, good for one apply; refused if targets or their state changed since
installToNoinstall the script at this path first (e.g. /usr/local/bin/ufw-blacklist.sh, which cron re-runs), then run that copy; the previous copy is kept as .bak-<time>
timeoutSecNo
installOnlyNowith installTo: only install the new copy (bash -n checked), do not run it — cron picks it up
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.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discharges much of it: it discloses ssh delivery, root execution from a temp dir, cleanup afterward, that the checked-out version is pinned and shown with commit/uncommitted-changes/hash, that secrets are read from mia's environment and never displayed, and that installTo keeps the prior copy as .bak-<time>. It omits explicit permission/auth requirements and error-handling traits, so it is not exhaustive.

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?

Information-dense and front-loaded: the core action appears first, followed by delivery/execution behavior, then provenance and the secrets model. It is fairly long, but nearly every clause carries new information, so it earns most of its length.

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 15-parameter, no-annotation, no-output-schema tool this is a fairly complete description: it explains the execution model, the safe plan/apply flow, provenance, and the secrets and install variants. Remaining gaps (behavior of timeoutSec, batch, continueOnError, skipUnreachable) are covered by schema descriptions, so an agent has enough to call it correctly.

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?

Schema coverage is high (87%), setting a baseline of 3, but the description adds meaning beyond the schema for the workflow-critical params: envFrom (secrets sourced from mia's own environment, never shown), with (companion files kept at same relative paths), apply/planHash (dry-run then apply, refused if state changed), and installTo (cron re-runs the installed copy). It adds genuine semantics rather than restating 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?

States a specific verb+resource: it runs the user's own fleet scripts from a local repo checkout on hosts, and names the exact kinds of scripts (deploy/migrate-blacklist.sh etc.). This clearly distinguishes it from generic remote-execution siblings like host_exec, since it emphasizes 'exactly the checked-out version runs' with commit/hash provenance.

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 lays out the intended two-phase workflow (dry run with apply=false and a planHash, then apply=true) and explains the envFrom/secrets path, which is real usage guidance. It does not explicitly contrast with alternatives such as host_exec or service_action, so it stops short of a full when/when-not routing statement.

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