ssh_host_use_config
Switch the active host configuration file for the session, changing which hosts are used by SSH connection and host management tools. Omit path to revert to default.
Instructions
Switch which host configuration file ssh_host_list, ssh_conn_connect, ssh_conn_add_host, ssh_host_update, and ssh_host_remove all operate against, for the rest of this session (or until you call this again) - not just for one call. This is the same "one active thing at a time" model ssh_conn_connect uses for SSH connections, applied to host configuration files instead; the two are completely independent (switching config files doesn't affect any current SSH connection, and vice versa).
Use this when you want to browse or use hosts from a different TOML file than the server's default - e.g. a separate list of hosts for a different environment/project. The alternate file must already exist and be a valid host configuration TOML file (see ssh_conn_add_host's docstring for the format) - this deliberately does NOT auto-create a missing file the way the server's own default config file is created on first run, since an LLM-supplied path with a typo should fail loudly rather than silently create a stray file somewhere.
Omit config_path (or pass "") to switch back to the server's original default
configuration file.
ssh_host_list's response always includes config_path showing whichever file is
currently active, so you can check before mutating anything with
ssh_conn_add_host/ssh_host_update/ssh_host_remove.
Returns:
On success: {'status': 'success', 'message', 'config_path', 'is_default' (bool), 'host_count'}. On failure (path doesn't exist, path is a directory,
or the file fails to parse as valid host config TOML):
{'status': 'error', 'error': <message>} - not a raised exception.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config_path | No | Path to an alternate host configuration TOML file to switch to. Omit or pass an empty string to revert to the server's default configuration file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||