Skip to main content
Glama

schedule_toggle

Toggle scheduled systemd timers and cron jobs off or on, or run a timer now. Dry-run first, then apply reversible changes.

Instructions

Switch a scheduled job off / on, or run a timer now (the «Расписание» buttons): a systemd timer — disable --now / enable --now (+ reset-failed of its service), run = start its service; a cron job — the exact line in /etc/crontab, /etc/cron.d/* or a user crontab is commented out with «#mia-off » (enable removes the marker; a copy of the file goes to /root/mia-backup first). Reversible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesinventory host
unitNothe timer (for timers)
applyNofalse (default) = dry run: show what will happen on which hosts and a planHash. true = run it; needs planHash
actionYesdisable / enable, or run a timer now
cronFileNocron: the file with the line
cronLineNocron: the exact line (as fleet_schedule shows it)
cronUserNocron: whose crontab (instead of a file)
planHashNoplanHash from the dry run of the very same call, good for one apply; refused if targets or their state changed since

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 does well: it discloses the concrete side effects (disable/enable --now, reset-failed of the timer's service, run = start its service), the cron mechanism (line commented with «#mia-off »), the backup copy written to /root/mia-backup, and explicit reversibility. It stops short of permissions/auth requirements and error behavior, so a 4 rather than 5.

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-loaded with the one-line purpose before the systemd/cron detail, and every clause carries information (exact commands, backup path, reversibility). It is dense and semicolon-chained into a single long statement, which slightly hurts scanability.

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 an 8-parameter mutation tool with no annotations and no output schema, the description covers the mutation semantics, branching, and reversibility well. The two-phase dry-run/planHash safety workflow is only in the schema, and no return/error expectations are given, leaving minor gaps.

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 baseline is 3. The description adds the timer-vs-cron branching that motivates the unit/cronFile/cronLine/cronUser parameter groups and explains the «#mia-off » marker tied to cronLine, but adds no syntax or format detail beyond 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 and resource: 'Switch a scheduled job off / on, or run a timer now', and splits the two concrete cases (systemd timer vs cron job) with the exact operations applied to each. An agent can tell exactly what state change this accomplishes without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The action semantics (disable / enable / run) structure the usage, and 'Reversible' hints the operation is safe to retry, but there is no explicit statement of when to prefer this over siblings like service_action or fleet_schedule, and no prerequisites (host access, required state) are given. Usage is implied rather than guided.

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