htb-hosts
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HTB_HOSTS_FILE | No | Target hosts file (handy for testing) | /etc/hosts |
| HTB_HOSTS_KEEP | No | Comma-separated domain substrings to keep outside the block on migrate | |
| HTB_HOSTS_BACKUP_DIR | No | Where snapshots are stored | ~/.local/state/htb-hosts |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| htb_hosts_addA | Add or update an HTB host entry in /etc/hosts (no sudo needed). Use this whenever you need a hostname like machine.htb to resolve to a box IP. Entries go in a managed block and can be cleaned later. |
| htb_hosts_removeB | Remove an HTB host entry from the managed block by hostname or IP. |
| htb_hosts_cleanA | Remove managed host entries. No args wipes the whole block; |
| htb_hosts_showA | Structured overview of the managed hosts, both flat ('entries') and grouped by box ('groups'). |
| htb_hosts_selectA | Look up managed entries by fuzzy pattern and return just their bare values, ready to feed into another command. |
| htb_hosts_retagA | Recompute every entry's tag from its box name (fixes bulk tag=imported). |
| htb_hosts_backupA | Save an explicit snapshot of /etc/hosts (never auto-pruned). |
| htb_hosts_restoreA | Restore /etc/hosts from a snapshot (most recent if no name is given). |
| htb_hosts_list_backupsA | List available /etc/hosts snapshots, oldest first. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Most tools have clearly distinct purposes: add/remove/show/select/retag/backup/restore/list_backups are easy to separate. The main overlap is between htb_hosts_remove and htb_hosts_clean, since both can remove managed entries by hostname/IP or pattern, though their descriptions clarify the difference.
All tools use the same htb_hosts_ prefix and snake_case verb-based naming. The pattern is predictable throughout, including list_backups as a verb_noun variant.
Nine tools is well-scoped for a focused /etc/hosts management server. Each tool covers a meaningful operation: entry lifecycle, querying, cleanup, tagging, and backup/restore.
The surface covers the full lifecycle: add/update, remove, patterned cleanup, structured and bare-value lookup, retagging, snapshot creation, restore, and backup listing. No obvious operations are missing for managing a managed hosts block.