Skip to main content
Glama

Add host

add_host
DestructiveIdempotent

Define an SSH host alias and connection settings in a managed ~/.ssh/config block, so ssh works without editing the main config.

Instructions

Add a host to ~/.ssh/config via the server's managed file.

The block is written in canonical form to a separate file, wired into the main config via Include; the manual config is not rewritten. An existing managed block for the same alias is replaced; an alias described manually is taken.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNossh port.
userNoLogin user; empty — don't write User.
aliasYesHost name for ssh (`ssh <alias>`); no spaces and no * ? # !.
extraNoOther ssh options as "Key: Value", written into the block as-is.
hostnameYesHost address or domain name (HostName).
proxy_jumpNoAlias of the jump host (ProxyJump); empty — direct connection.
identity_fileNoPath to the private key (IdentityFile); empty — don't write it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesthe host as seen by ssh -G after writing; null — ssh -G couldn't parse it
aliasYes
config_fileYesmanaged file the Host block was written to
include_addedYesan Include line pointing at the managed file was added to the main config

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, and the description goes further by disclosing exactly what happens: writes to a separate managed file, wires it in via Include, leaves the manual config untouched, replaces an existing managed block for the same alias, and defers to a manually described alias. This directly answers what gets destroyed and what is preserved.

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?

Two compact paragraphs, front-loaded with the core action before the mechanism details. Dense but each sentence carries distinct value; nothing is padded.

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?

With an output schema, full annotation coverage, and 100% schema description coverage, the description only needs to carry the unusual write semantics, which it does well. It stops short of only usage/routing context against siblings.

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%, so all seven parameters are already documented in the schema itself (alias, hostname, port, user, extra, proxy_jump, identity_file). The description adds no parameter-level detail, so the baseline 3 applies.

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?

States a specific verb+resource ('Add a host to ~/.ssh/config') and clarifies the mechanism (managed file, Include wiring). It is clearly distinct from siblings like remove_host and get_host by verb alone, but it never names an alternative to sharpen the boundary.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no routing against siblings such as check_hosts, trust_host, or get_host. The conflict/resolution rules are behavior, not usage guidance.

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