Skip to main content
Glama

htb_hosts_restore

Restore /etc/hosts from a saved snapshot to recover host entries; uses the most recent backup when no name is provided.

Instructions

Restore /etc/hosts from a snapshot (most recent if no name is given).

Input Schema

NameRequiredDescriptionDefault
nameNoBackup name or substring to restore

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. 'Restore' implies overwriting the current /etc/hosts and the default-to-latest behavior is disclosed, but it never says the existing file content is replaced, whether a pre-restore backup is taken, or what privileges are required.

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?

A single sentence that front-loads the verb and resource and packs the default-behavior rule into a parenthetical. Nothing is wasted and nothing needs to be scanned for.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-optional-parameter tool with no output schema, this covers the core action, but with zero annotations the omission of destructiveness (current hosts file is discarded), error behavior for unmatched names, and multi-match handling leaves meaningful gaps.

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 100%, so 'Backup name or substring' is already documented. The description adds real value by explaining the omission default (most recent snapshot), which the schema does not state for this optional parameter.

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

Purpose4/5

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

Specific verb (restore) plus resource (/etc/hosts) plus source (a snapshot), which cleanly separates it from siblings like htb_hosts_backup and htb_hosts_list_backups. It stops short of naming those siblings as the related steps, but the operation itself is unambiguous.

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 parenthetical 'most recent if no name is given' tells the agent what happens when the parameter is omitted, which is genuine usage guidance. However, there is no statement of prerequisites, no mention that a backup must exist first, and no pointer to htb_hosts_list_backups for discovering names.

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