Skip to main content
Glama

host-restart

Destructive

Restart services on a database host through a gated, auditable operation that uses inventory credentials, maintenance windows, confirmations, and a recorded reason.

Instructions

dbabrain common.cli host-restart: A gated action on a host: facts, a service, a restart. server_id (or target) names the server; its connection or host login is completed from this node's inventory and encrypted secret store, so a request carries no password. Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • target: The machine or instance: a server_id, or <db_type> <ip>[:port].

  • access: An inline cmd_access, for a host outside the inventory.

  • platform: windows | linux, when the inventory does not say.

  • action: host-service: status | start | stop | restart.

  • services: host-service: which services.

  • wait: Wait for the end state.

  • window: The maintenance window it must fall in.

  • ignore_window: Run outside that window, deliberately.

  • overrides: Blocking gates accepted on purpose.

  • evidence: Where to write the evidence file.

  • sudo: Run through sudo on Linux.

  • dry_run: Plan only: change nothing.

  • confirm: The payload declares the operator agreed.

  • assume_yes: Unattended: take the typed yes as given.

  • authorized_by: Who approved it, for example {"channel": "telegram"}.

  • reason: Why, for the evidence.

  • policy: The maintenance policy that times this host operation: the node's maintenance_policy.json defaults with this server's own values over them. {} means the built-in defaults. The app that calls fills it from its own data...

  • rules: What the operation costs to confirm: {level, confirmations, challenge, effects} - the node's own emergency_operations.json entry for it. Absent, the ladder the package ships prices it; malformed, it is refused rather ...

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "host-restart"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already flag readOnlyHint=false, destructiveHint=true and openWorldHint=true, so the safety profile is known. The description adds real behavioral context beyond that: a request carries no password because credentials resolve from the node's inventory and secret store, the action is gated by an emergency-operations ladder, dry_run/overrides/evidence/authorized_by exist, and "Changes or removes something" restates the destructive scope. It stops short of saying whether a restart is reversible or what gates block it.

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

Conciseness3/5

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

The field list is the most valuable part and is reasonably scannable, but the opening is a pasted CLI help block that mixes in generic boilerplate ("Changes or removes something") and a sibling's name ("facts"). Several entries trail off with ellipses, showing truncation rather than concision — the reader can't tell whether content was cut.

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?

An output schema exists and annotations cover the destructive profile, so the description need not explain return values. For a high-risk destructive action with an effectively undocumented 17-field request payload, it covers nearly every field plus the confirmation/authorization requirement; the remaining gaps are truncated explanations for policy and rules and the absence of a worked example request.

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 is a single opaque `request` object with additionalProperties and 0% description coverage, so the description carries the full burden — and it largely does, enumerating target, access, platform, action, services, wait, window, ignore_window, overrides, evidence, sudo, dry_run, confirm, assume_yes, authorized_by, reason, policy and rules. Some entries are truncated or circular (policy "is filled from its own data...", rules "the ladder the package ships prices it; malformed, it is refused rather ..."), which leaves the highest-stakes fields only partially explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"A gated action on a host: facts, a service, a restart" plus the action enum (status | start | stop | restart) conveys the verb and resource, but the mention of "facts" muddies it against the host-facts sibling rather than sharpening the distinction. An agent can infer this restarts a host service, but it takes reading the field list to get there.

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

Usage Guidelines2/5

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

The description states a prerequisite (a command on the emergency-operations list needs confirm: "yes" and a reason) but never says when to pick this over host-service or probe-host, nor when not to use it. Sibling differentiation is left entirely to the agent, and the one cross-reference ("facts") is ambiguous rather than routing.

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

Deploy Server

Other Tools