Skip to main content
Glama

htb_hosts_clean

Remove managed host entries by exact tag, matching all patterns, or exclusion keep-list; use dry-run to preview changes before editing /etc/hosts.

Instructions

Remove managed host entries. No args wipes the whole block; tag removes one box by its exact tag; match removes the entries htb_hosts_select would return for the same patterns (every pattern must match); exclude is the inverse keep-list, removing everything EXCEPT entries matching ANY pattern. The three are mutually exclusive. Set dry_run to preview what would go without touching the file.

Input Schema

NameRequiredDescriptionDefault
tagNoRemove only entries with this exact tag
matchNoRemove entries matching EVERY pattern (as htb_hosts_select)
dry_runNoReport what would be removed without changing the file
excludeNoFuzzy patterns to KEEP; everything else is removed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does reasonably well: it discloses that the operation mutates a file, that the no-argument form destroys the entire block, and that dry_run previews without writing. It does not mention reversibility or the existence of the backup/restore siblings, which would matter for a destructive tool.

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 core action, then one clause per mode, then the exclusivity rule, then dry_run. Dense and mostly waste-free, though the mode enumeration and the exclusivity sentence could be merged for tighter structure.

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?

Covers all four optional parameters, the destructive default case, and the preview path, which is close to sufficient for a 4-param mutation tool with no annotations and no output schema. What's absent is what the operation returns and whether backups are taken automatically.

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 the baseline is 3; the description adds genuine meaning on top by tying `match` to htb_hosts_select's semantics, framing `exclude` as its inverse keep-list, and declaring the three selection parameters mutually exclusive. Only `dry_run`'s interaction with the other modes (e.g. combined with no args) is left implicit.

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?

Opens with a specific verb+resource ("Remove managed host entries") and then enumerates the four operating modes, so the agent knows exactly what the tool does. It does not, however, differentiate itself from the sibling htb_hosts_remove, which an agent could easily confuse with this tool.

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?

Each mode's selection condition is spelled out (no args = full block, tag = exact tag, match = htb_hosts_select semantics, exclude = inverse keep-list) and mutual exclusivity is stated explicitly. Missing is any guidance on when to prefer this over htb_hosts_remove, or any prerequisite/confirmation context.

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