Skip to main content
Glama

Forget host key

forget_host
DestructiveIdempotent

Remove a host's known_hosts entry to fix 'Remote host identification has changed' errors. The next connection accepts the new key while SSH config and secrets remain intact.

Instructions

Remove known_hosts entries for a host without touching the config.

For the "Remote host identification has changed" case: the next connection will accept the new key. The config and secrets are left in place.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesAlias from the config (its hostname is cleaned) or the hostname/IP itself.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYeshost name used to clean known_hosts
removedYesentries removed
known_hosts_fileYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds real value beyond that: it scopes the mutation to known_hosts only, reassures that config and secrets are preserved, and predicts the post-call effect. It doesn't say whether the removal is reversible or what happens if no matching entry exists.

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?

Two short paragraphs, front-loaded with the core action and scope, then the motivating scenario. Every sentence carries information; nothing is redundant.

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

Completeness5/5

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

With an output schema present, return values need no explanation, and annotations carry the safety metadata. The description supplies the remaining pieces an agent needs: exact scope of the mutation, what is preserved, and the intended scenario.

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% and the single parameter is fully documented there, including the alias-or-hostname duality. The description adds no format, syntax, or edge-case detail beyond the schema, so the baseline 3 applies.

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 ('Remove known_hosts entries for a host') and immediately bounds the scope with 'without touching the config.' This distinguishes it from siblings like remove_host (config removal) and trust_host (adding trust), so an agent can pick the right tool without opening a schema.

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?

It names a concrete triggering scenario — the 'Remote host identification has changed' case — and explains what happens next ('the next connection will accept the new key'), which is clear usage context. It falls short of a 5 because it never names the alternative siblings (e.g., trust_host, remove_host) or states when NOT to use this tool.

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