{"at":"2026-11-23T02:40:56.451Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T02:40:56.897Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T02:40:57.048Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T02:40:57.490Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"mcp-ssh-manager","version":"4.2.0"}}}}
{"at":"2026-11-23T02:40:57.490Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T02:40:57.490Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T02:40:57.501Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Runs a shell command over SSH on a named configured server and returns stdout, stderr, and exit code. Mutates remote state depending on the command; not read-only. Expands command aliases before running. Uses the cwd parameter or, if omitted, the server configured default directory; adapts syntax for Linux versus Windows PowerShell targets. Timeout defaults to 120000 ms and is capped at 300000 ms. Under readonly mode destructive commands like rm or dd are refused; under restricted mode the command must match allow patterns. Output is truncated when very large. For a job that outlives the timeout (a training run, a long build) set background to true instead of using nohup yourself: it starts the command detached and returns at once with its pid and the log file it writes to; read that file with ssh_tail (follow: false) and check or stop the job with ssh_process_manager.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"background":{"description":"Start the command detached and return at once with { pid, logFile } instead of waiting for it; the timeout does not apply. For long jobs; not available on Windows targets.","type":"boolean"},"command":{"description":"Command to execute","type":"string"},"cwd":{"description":"Working directory (optional, uses default if configured)","type":"string"},"server":{"description":"Server name from configuration","type":"string"},"timeout":{"description":"Command timeout in milliseconds (default: 120000, max: 300000)","type":"number"}},"required":["server","command"],"type":"object"},"name":"ssh_execute"},{"description":"Uploads one local file to a remote destination path over SFTP on the named server, overwriting any existing remote file at that path. Mutates remote state and is not idempotent beyond replacing the target. Creates no backup. Requires the local file to exist. Does not use sudo, so the remote path must be writable by the configured SSH user. This tool is blocked entirely on servers set to readonly or restricted security mode. For directory trees use ssh_sync instead.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"localPath":{"description":"Local file path","type":"string"},"remotePath":{"description":"Remote destination path","type":"string"},"server":{"description":"Server name","type":"string"}},"required":["server","localPath","remotePath"],"type":"object"},"name":"ssh_upload"},{"description":"Downloads one remote file from the named server to a local destination path over SFTP, overwriting any existing local file at that path. Affects only the local filesystem and is read-only on the remote side, so it stays allowed even on servers in readonly or restricted security mode. Reads the remote file using the configured SSH user, which must have permission to read it. Handles single files only; use ssh_sync for directories.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"localPath":{"description":"Local destination path","type":"string"},"remotePath":{"description":"Remote file path","type":"string"},"server":{"description":"Server name","type":"string"}},"required":["server","remotePath","localPath"],"type":"object"},"name":"ssh_download"},{"description":"Synchronizes files or directories between local and remote using rsync over SSH on the named server. Each of source and destination must carry a local: or remote: prefix and one side must be local and the other remote; with no prefix it assumes a push from local to remote. On Windows MCP hosts, provide native Windows local paths such as C:\\project or .\\project; the tool converts drive-letter and UNC paths to MSYS2 format before spawning rsync. Do not pre-convert a local path to /c/project because Node performs local filesystem checks using Windows path semantics. Mutates the destination. Setting delete true removes destination files absent from source, which is destructive; dryRun true previews without changing anything. Compression is on by default. Password authentication requires sshpass installed locally. Blocked on readonly or restricted servers. Timeout defaults to 30000 ms.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"checksum":{"description":"Use checksum instead of timestamp for comparison","type":"boolean"},"compress":{"description":"Compress during transfer","type":"boolean"},"delete":{"description":"Delete files in destination not in source","type":"boolean"},"destination":{"description":"Destination path with a \"local:\" or \"remote:\" prefix. On Windows, use a native local path such as \"local:C:\\output\" or \"local:.\\output\"; do not pre-convert it to MSYS2 /c/... syntax.","type":"string"},"dryRun":{"description":"Perform dry run without actual changes","type":"boolean"},"exclude":{"description":"Patterns to exclude from sync","items":{"type":"string"},"type":"array"},"server":{"description":"Server name from configuration","type":"string"},"source":{"description":"Source path with a \"local:\" or \"remote:\" prefix. On Windows, use a native local path such as \"local:C:\\project\" or \"local:.\\project\"; do not pre-convert it to MSYS2 /c/... syntax.","type":"string"},"timeout":{"description":"Timeout in milliseconds (default: 30000)","type":"number"},"verbose":{"description":"Show detailed progress","type":"boolean"}},"required":["server","source","destination"],"type":"object"},"name":"ssh_sync"},{"description":"Reads the tail of a remote log file on the named server, optionally filtered by a grep pattern. Read-only; it does not modify remote state. Behavior depends on follow, which defaults to true: in follow mode it starts a streaming tail whose output is written to the server process stderr rather than returned, and the response only reports a session note, so to capture content directly set follow to false to get the last N lines back. The lines parameter defaults to 10.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"file":{"description":"Path to the log file to tail","type":"string"},"follow":{"description":"Follow file for new content (default: true)","type":"boolean"},"grep":{"description":"Filter lines with grep pattern","type":"string"},"lines":{"description":"Number of lines to show initially (default: 10)","type":"number"},"server":{"description":"Server name from configuration","type":"string"}},"required":["server","file"],"type":"object"},"name":"ssh_tail"},{"description":"Collects a read-only snapshot of system resources on the named Linux server by running inspection commands such as top, free, df, ss, and ps. The type parameter selects the view and defaults to overview; other values are cpu, memory, disk, network, and process. Does not change remote state and needs no sudo. The interval and duration parameters are accepted for continuous monitoring intent but a single snapshot is gathered. Targets Linux tooling, so output may be empty on Windows hosts.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"duration":{"description":"Duration in seconds for continuous monitoring","type":"number"},"interval":{"description":"Update interval in seconds for continuous monitoring","type":"number"},"server":{"description":"Server name from configuration","type":"string"},"type":{"description":"Type of monitoring (default: overview)","enum":["overview","cpu","memory","disk","network","process"],"type":"string"}},"required":["server"],"type":"object"},"name":"ssh_monitor"},{"description":"Returns the in-memory log of SSH commands previously run through this server process during the current session, formatted with timestamps, server, duration, and success status. Purely local and read-only: it opens no SSH connection and does not persist across restarts. Optional filters narrow the results by server name, by success or failure, and by a search substring in the command text; limit defaults to 20 most recent entries. Does not expose command output, only the commands and their outcomes.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"description":"Number of commands to show (default: 20)","type":"number"},"search":{"description":"Search in commands","type":"string"},"server":{"description":"Filter by server name","type":"string"},"success":{"description":"Filter by success/failure","type":"boolean"}},"type":"object"},"name":"ssh_history"},{"description":"Opens a new persistent interactive shell on the named configured server and returns a generated session ID. Stateful and side-effecting: it establishes (or reuses pooled) SSH connection and keeps an open shell that preserves working directory, environment, and command history across later ssh_session_send calls, unlike one-shot ssh_execute. The optional name is only a human label. The session stays open and consumes a remote shell until ssh_session_close is called.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"name":{"description":"Optional session name for identification","type":"string"},"server":{"description":"Server name from configuration","type":"string"}},"required":["server"],"type":"object"},"name":"ssh_session_start"},{"description":"Runs one command inside an already-open session identified by its session ID, reusing the persisted working directory, environment, and history of that shell. Mutates remote state like any shell command and is not idempotent; cd and export update the saved context for subsequent calls. Commands run through a bash-style shell (Unix-oriented). The security policy of the underlying server is enforced, so readonly or restricted servers may refuse. Default timeout is 30000 ms.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"command":{"description":"Command to execute in the session","type":"string"},"session":{"description":"Session ID from ssh_session_start","type":"string"},"timeout":{"description":"Command timeout in milliseconds (default: 30000)","type":"number"}},"required":["session","command"],"type":"object"},"name":"ssh_session_send"},{"description":"Lists currently active SSH sessions with their ID, server, state, working directory, command count, age, idle time, and any defined variables. Read-only: it inspects in-memory session state and changes nothing on remote hosts or local config. The optional server argument is a case-insensitive substring filter on server name; omit it to list every active session. Closed sessions are excluded from the results.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"server":{"description":"Filter by server name","type":"string"}},"type":"object"},"name":"ssh_session_list"},{"description":"Terminates an open SSH session given its session ID, writing exit to the remote shell, ending it, and discarding its in-memory history and context; the session ID becomes unusable afterward. Destructive to session state but does not delete remote files. Passing the literal value all closes every active session at once, ignoring individual close errors. It does not drop the pooled underlying connection, only the interactive shell.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"session":{"description":"Session ID to close (or \"all\" to close all sessions)","type":"string"}},"required":["session"],"type":"object"},"name":"ssh_session_close"},{"description":"Runs one command on every server belonging to the named group and returns a per-server success or failure report. Members come from the groups defined with ssh_group_manage plus every server whose configuration carries a matching group field, so a group can exist through the config alone. Mutates remote state on each member and is not idempotent. Best-effort: the security policy of each server is evaluated independently, so readonly or restricted members are reported as failed without aborting the rest unless stopOnError is set. Strategy may be parallel, sequential, or rolling (delay applies between servers). Per-server timeout is 30000 ms; cwd defaults to the default_dir of each server.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"command":{"description":"Command to execute","type":"string"},"cwd":{"description":"Working directory","type":"string"},"delay":{"description":"Delay between servers in ms (for rolling)","type":"number"},"group":{"description":"Group name (e.g., \"production\", \"staging\", \"all\")","type":"string"},"stopOnError":{"description":"Stop execution on first error","type":"boolean"},"strategy":{"description":"Execution strategy","enum":["parallel","sequential","rolling"],"type":"string"}},"required":["group","command"],"type":"object"},"name":"ssh_execute_group"},{"description":"Creates, updates, deletes, and inspects named server groups used by ssh_execute_group, persisting changes to local configuration only with no remote side effects. The action selects the operation: create, update, delete, add-servers, remove-servers, or list. Every action except list requires name; add-servers and remove-servers also require a non-empty servers array. list is read-only and also reports the groups derived from the per-server group field of the SSH configuration, which are read-only here and change only by editing that configuration. Optional strategy, delay, and stopOnError set default group execution behavior.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"action":{"description":"Action to perform","enum":["create","update","delete","list","add-servers","remove-servers"],"type":"string"},"delay":{"description":"Delay between servers in ms","type":"number"},"description":{"description":"Group description","type":"string"},"name":{"description":"Group name","type":"string"},"servers":{"description":"Server names","items":{"type":"string"},"type":"array"},"stopOnError":{"description":"Stop on error flag","type":"boolean"},"strategy":{"description":"Execution strategy","enum":["parallel","sequential","rolling"],"type":"string"}},"required":["action"],"type":"object"},"name":"ssh_group_manage"},{"description":"Lists all SSH servers defined in the loaded configuration, returning for each the name, host, user, port, authentication type (password or key), default directory, group, and description. Read-only and local: it reads configuration only and opens no SSH connections. Deliberately omits secrets, so no passwords, key paths, passphrases, or sudo passwords are returned. Takes no parameters. Useful as a first call to discover which server names other tools accept.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"ssh_list_servers"},{"description":"Deploys a list of local files to remote paths on the named server, uploading each to a temporary location first and then moving it into place. Mutates remote state. By default it backs up any existing target file before overwriting; backup can be disabled per call. Options can set owner and permissions, supply a sudo password, and name a single service to restart afterward. Detects sensible owner and permission defaults from the remote path. Runs pre and post deploy hooks. Blocked entirely on servers in readonly or restricted security mode.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"files":{"description":"Array of files to deploy","items":{"properties":{"local":{"description":"Local file path","type":"string"},"remote":{"description":"Remote file path","type":"string"}},"required":["local","remote"],"type":"object"},"type":"array"},"options":{"description":"Deployment options","properties":{"backup":{"default":true,"description":"Backup existing files","type":"boolean"},"owner":{"description":"Set file owner (e.g., \"user:group\")","type":"string"},"permissions":{"description":"Set file permissions (e.g., \"644\")","type":"string"},"restart":{"description":"Service to restart after deployment","type":"string"},"sudoPassword":{"description":"Sudo password if needed (use with caution)","type":"string"}},"type":"object"},"server":{"description":"Server name or alias","type":"string"}},"required":["server","files"],"type":"object"},"name":"ssh_deploy"},{"description":"Runs a command with elevated privileges via sudo on the named server and returns the exit code and output. Prepends sudo when absent. If a password is given, or a sudo password is configured for the server, it is piped to sudo -S and masked in the returned output. Mutates remote state and can be destructive. Honors the cwd parameter or the server default directory and adapts to Linux or Windows. Timeout defaults to 30000 ms. Blocked entirely in readonly mode; in restricted mode the command must satisfy the allow and deny patterns.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"command":{"description":"Command to execute with sudo","type":"string"},"cwd":{"description":"Working directory","type":"string"},"password":{"description":"Sudo password (will be masked in output)","type":"string"},"server":{"description":"Server name or alias","type":"string"},"timeout":{"description":"Command timeout in milliseconds (default: 30000)","type":"number"}},"required":["server","command"],"type":"object"},"name":"ssh_execute_sudo"},{"description":"Manages local shorthand aliases that map a short name to a full command string, stored in local config with no remote execution or side effects. The action selects behavior: add (requires both alias and command), remove (requires alias), list to show all aliases tagged as profile or custom, or suggest to return existing aliases matching a search term passed in the command field. Adding an existing alias overwrites it.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"action":{"description":"Action to perform","enum":["add","remove","list","suggest"],"type":"string"},"alias":{"description":"Alias name (for add/remove)","type":"string"},"command":{"description":"Command to alias (for add) or search term (for suggest)","type":"string"}},"required":["action"],"type":"object"},"name":"ssh_command_alias"},{"description":"Manages automation hooks that fire around SSH operations such as pre-deploy, toggling them on or off in local configuration only with no immediate remote action. The action selects behavior: list shows each hook with its enabled state, description, and action count; enable and disable flip a hook and both require the hook name; status summarizes which hooks are currently enabled versus disabled. Toggling persists and affects later operations.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"action":{"description":"Action to perform","enum":["list","enable","disable","status"],"type":"string"},"hook":{"description":"Hook name (for enable/disable)","type":"string"}},"required":["action"],"type":"object"},"name":"ssh_hooks"},{"description":"Manages SSH Manager profiles that bundle command aliases and hooks for different project types, affecting local configuration only with no remote side effects. The action selects behavior: list shows available profiles and the active one, current shows the active profile details, and switch activates a named profile and requires the profile argument. A successful switch reports that Claude Code must be restarted before the new profile takes effect.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"action":{"description":"Action to perform","enum":["list","switch","current"],"type":"string"},"profile":{"description":"Profile name (for switch)","type":"string"}},"required":["action"],"type":"object"},"name":"ssh_profile"},{"description":"Inspects and manages the pooled SSH connections held by this server process; affects only local in-memory connections, never remote state. The action parameter selects: status lists active connections with age and keepalive (read-only); reconnect closes then reopens one connection; disconnect closes one connection; cleanup drops aged-out and dead connections. The server parameter is required for reconnect and disconnect and ignored otherwise.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"action":{"description":"Action to perform","enum":["status","reconnect","disconnect","cleanup"],"type":"string"},"server":{"description":"Server name (for reconnect/disconnect)","type":"string"}},"required":["action"],"type":"object"},"name":"ssh_connection_status"},{"description":"Opens a new SSH connection to the named server and starts a port-forwarding or SOCKS proxy tunnel that keeps running until closed. The type parameter selects local forward, remote forward, or dynamic SOCKS5 proxy. localPort is always required; remoteHost and remotePort are required for local and remote types but ignored for dynamic. localHost defaults to 127.0.0.1. Returns a tunnel ID used later to close it.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"localHost":{"description":"Local host (default: 127.0.0.1)","type":"string"},"localPort":{"description":"Local port","type":"number"},"remoteHost":{"description":"Remote host (not needed for dynamic)","type":"string"},"remotePort":{"description":"Remote port (not needed for dynamic)","type":"number"},"server":{"description":"Server name or alias","type":"string"},"type":{"description":"Tunnel type","enum":["local","remote","dynamic"],"type":"string"}},"required":["server","type","localPort"],"type":"object"},"name":"ssh_tunnel_create"},{"description":"Lists currently active SSH tunnels tracked by this process, showing each tunnel ID, server, type, state, local and remote endpoints, active and total connection counts, bytes transferred, error count, and timestamps. Read-only: it does not create, modify, or close anything. The optional server parameter filters results to one server; omit it to list every active tunnel across all servers.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"server":{"description":"Filter by server name","type":"string"}},"type":"object"},"name":"ssh_tunnel_list"},{"description":"Tears down active SSH tunnels created earlier, freeing the bound local ports; this affects only local tunnel state, not the remote host. Exactly one of tunnelId or server must be supplied: tunnelId closes that single tunnel, while server closes every tunnel for the named server and reports how many were closed. Supplying neither raises an error. Closing is final and cannot be undone.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"server":{"description":"Close all tunnels for this server","type":"string"},"tunnelId":{"description":"Tunnel ID to close","type":"string"}},"type":"object"},"name":"ssh_tunnel_close"},{"description":"Manages SSH host key fingerprints in your local known_hosts file for the named server. The action parameter selects: verify, check, and list are read-only comparisons or listings; accept adds or updates the host key in known_hosts; remove deletes it. accept and remove mutate local state and are blocked on servers configured as readonly. server is required for every action except list. autoAccept defaults to false and should be used with caution.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"action":{"description":"Action to perform","enum":["verify","accept","remove","list","check"],"type":"string"},"autoAccept":{"description":"Automatically accept new keys (use with caution)","type":"boolean"},"server":{"description":"Server name (required for most actions)","type":"string"}},"required":["action"],"type":"object"},"name":"ssh_key_manage"},{"description":"Manages local name aliases that let you reference a configured server by a shorter or alternative name. The action parameter selects add, remove, or list. add creates an alias pointing to an existing server and requires both alias and server; remove deletes an alias and requires alias; list shows all aliases (read-only). add and remove persist the alias mapping locally. The target server must already exist for add to succeed.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"action":{"description":"Action to perform","enum":["add","remove","list"],"type":"string"},"alias":{"description":"Alias name (for add/remove)","type":"string"},"server":{"description":"Server name (for add)","type":"string"}},"required":["action"],"type":"object"},"name":"ssh_alias"},{"description":"Creates a database or file backup on the remote server over SSH, writing a compressed archive plus a JSON metadata file into backupDir. Supports mysql, postgresql, mongodb, and files (full is not yet implemented and errors). Database types require database; files requires paths. After writing it prunes backups older than retention days (default 7); compress defaults to true. Runs pre-backup and post-backup hooks.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"backupDir":{"description":"Backup directory (default: /var/backups/ssh-manager)","type":"string"},"compress":{"description":"Compress backup (default: true)","type":"boolean"},"database":{"description":"Database name (required for db types)","type":"string"},"dbHost":{"description":"Database host (default: localhost)","type":"string"},"dbPassword":{"description":"Database password","type":"string"},"dbPort":{"description":"Database port","type":"number"},"dbUser":{"description":"Database user","type":"string"},"exclude":{"description":"Patterns to exclude from backup","items":{"type":"string"},"type":"array"},"name":{"description":"Backup name (e.g., production, app-data)","type":"string"},"paths":{"description":"Paths to backup (for files type)","items":{"type":"string"},"type":"array"},"retention":{"description":"Retention period in days (default: 7)","type":"number"},"server":{"description":"Server name","type":"string"},"type":{"description":"Backup type: mysql, postgresql, mongodb, files, or full","enum":["mysql","postgresql","mongodb","files","full"],"type":"string"}},"required":["server","type","name"],"type":"object"},"name":"ssh_backup_create"},{"description":"Lists existing backups found in backupDir on the remote server, returning each backup id, type, database or paths, size, compression, retention, status, and creation time parsed from stored metadata. Read-only: it inspects the filesystem and mutates nothing. Optional type filters results to mysql, postgresql, mongodb, files, or full. backupDir defaults to the configured backup directory.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"backupDir":{"description":"Backup directory (default: /var/backups/ssh-manager)","type":"string"},"server":{"description":"Server name","type":"string"},"type":{"description":"Filter by backup type","enum":["mysql","postgresql","mongodb","files","full"],"type":"string"}},"required":["server"],"type":"object"},"name":"ssh_backup_list"},{"description":"Restores a previously created backup identified by backupId, reading its metadata to pick the engine. This is destructive and overwrites the target: PostgreSQL runs pg_restore with --clean --if-exists which DROPs existing objects, MongoDB runs mongorestore --drop, and MySQL pipes the dump into the live database replacing matching objects. Supports mysql, postgresql, mongodb, and files. Runs pre-restore and post-restore hooks.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"backupDir":{"description":"Backup directory (default: /var/backups/ssh-manager)","type":"string"},"backupId":{"description":"Backup ID to restore","type":"string"},"database":{"description":"Target database name (for db restores)","type":"string"},"dbHost":{"description":"Database host (default: localhost)","type":"string"},"dbPassword":{"description":"Database password","type":"string"},"dbPort":{"description":"Database port","type":"number"},"dbUser":{"description":"Database user","type":"string"},"server":{"description":"Server name","type":"string"},"targetPath":{"description":"Target path for files restore (default: /)","type":"string"}},"required":["server","backupId"],"type":"object"},"name":"ssh_backup_restore"},{"description":"Schedules a recurring backup on the remote server by writing an executable bash script to /usr/local/bin/ssh-manager-backup-NAME.sh and installing a crontab entry for the given cron expression. Mutates the remote filesystem and crontab, and typically needs root to write that path. Supports mysql, postgresql, mongodb, and files; the generated script also deletes backups older than retention days (default 7).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"database":{"description":"Database name (for db types)","type":"string"},"name":{"description":"Backup name","type":"string"},"paths":{"description":"Paths to backup (for files type)","items":{"type":"string"},"type":"array"},"retention":{"description":"Retention period in days (default: 7)","type":"number"},"schedule":{"description":"Cron schedule (e.g., \"0 2 * * *\" for daily at 2 AM)","type":"string"},"server":{"description":"Server name","type":"string"},"type":{"description":"Backup type","enum":["mysql","postgresql","mongodb","files"],"type":"string"}},"required":["server","schedule","type","name"],"type":"object"},"name":"ssh_backup_schedule"},{"description":"Runs a comprehensive read-only health check on the named server by executing diagnostic shell commands over SSH, then returns parsed JSON with overall status, CPU, memory, disk usage, and uptime. It only reads metrics and changes nothing on the remote host. Set detailed to true to additionally include load average and network metrics; it defaults to false. Critical CPU, memory, or disk conditions are surfaced in a critical_issues list.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"detailed":{"description":"Include detailed metrics (network, load average)","type":"boolean"},"server":{"description":"Server name","type":"string"}},"required":["server"],"type":"object"},"name":"ssh_health_check"},{"description":"Checks the running state of the named system services on a remote server by querying each one over SSH, returning JSON per service plus running and stopped counts and an aggregate health rating. Read-only: it inspects status without starting, stopping, or restarting anything. The services array parameter is required and lists the service names to check, for example nginx, mysql, or docker; common names are resolved to their actual unit names automatically.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"server":{"description":"Server name","type":"string"},"services":{"description":"Service names to check (e.g., nginx, mysql, docker)","items":{"type":"string"},"type":"array"}},"required":["server","services"],"type":"object"},"name":"ssh_service_status"},{"description":"Lists, inspects, or terminates processes on a remote server over SSH. The action parameter selects: list returns top processes (read-only), info returns details for one process (read-only), and kill sends a signal to terminate a process and mutates remote state. pid is required for kill and info. kill is blocked on servers configured as readonly. signal defaults to TERM, sortBy defaults to cpu, and limit defaults to 20; filter narrows the list by name or command.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"action":{"description":"Action: list processes, kill process, or get process info","enum":["list","kill","info"],"type":"string"},"filter":{"description":"Filter processes by name/command","type":"string"},"limit":{"description":"Number of processes to return (default: 20)","type":"number"},"pid":{"description":"Process ID (required for kill and info actions)","type":"number"},"server":{"description":"Server name","type":"string"},"signal":{"description":"Signal to send when killing (default: TERM)","enum":["TERM","KILL","HUP","INT","QUIT"],"type":"string"},"sortBy":{"description":"Sort processes by CPU or memory (default: cpu)","enum":["cpu","memory"],"type":"string"}},"required":["server","action"],"type":"object"},"name":"ssh_process_manager"},{"description":"Configures and evaluates CPU, memory, and disk usage alert thresholds for a remote server. The action parameter selects: set writes the threshold config to /etc/ssh-manager-alerts.json on the remote host (mutating, may need write access to /etc, and is blocked on readonly servers); get reads back that config; check reads current metrics and compares them to stored thresholds. get and check are read-only. enabled defaults to true; check errors if no config exists yet.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"action":{"description":"Action: set thresholds, get config, or check current metrics against thresholds","enum":["set","get","check"],"type":"string"},"cpuThreshold":{"description":"CPU usage threshold percentage (e.g., 80)","type":"number"},"diskThreshold":{"description":"Disk usage threshold percentage (e.g., 85)","type":"number"},"enabled":{"description":"Enable or disable alerts (default: true)","type":"boolean"},"memoryThreshold":{"description":"Memory usage threshold percentage (e.g., 90)","type":"number"},"server":{"description":"Server name","type":"string"}},"required":["server","action"],"type":"object"},"name":"ssh_alert_setup"},{"description":"Dumps a database to a file on the remote server over SSH; it reads data only and does not modify the database. Supports mysql (using --single-transaction --routines --triggers), postgresql (custom format with --clean --if-exists, restorable via pg_restore), and mongodb. compress defaults to true and gzips the output. The optional tables list applies to MySQL and PostgreSQL only and is ignored for MongoDB.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"compress":{"description":"Compress output with gzip (default: true)","type":"boolean"},"database":{"description":"Database name","type":"string"},"dbHost":{"description":"Database host (default: localhost)","type":"string"},"dbPassword":{"description":"Database password","type":"string"},"dbPort":{"description":"Database port","type":"number"},"dbUser":{"description":"Database user","type":"string"},"outputFile":{"description":"Output file path (will be created on remote server)","type":"string"},"server":{"description":"Server name","type":"string"},"tables":{"description":"Specific tables to dump (MySQL/PostgreSQL only)","items":{"type":"string"},"type":"array"},"type":{"description":"Database type","enum":["mysql","postgresql","mongodb"],"type":"string"}},"required":["server","type","database","outputFile"],"type":"object"},"name":"ssh_db_dump"},{"description":"Imports a dump file into a target database on the remote server and is destructive to existing data. PostgreSQL uses pg_restore --clean --if-exists which DROPs existing objects before loading; MongoDB uses mongorestore with --drop controlled by the drop flag (default true); MySQL pipes the file into the live database, replacing objects defined in it. Supports mysql, postgresql, mongodb. Compressed .gz inputs are decompressed automatically.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"database":{"description":"Target database name","type":"string"},"dbHost":{"description":"Database host (default: localhost)","type":"string"},"dbPassword":{"description":"Database password","type":"string"},"dbPort":{"description":"Database port","type":"number"},"dbUser":{"description":"Database user","type":"string"},"drop":{"description":"Drop existing collections/tables before import (MongoDB only, default: true)","type":"boolean"},"inputFile":{"description":"Input file path (on remote server)","type":"string"},"server":{"description":"Server name","type":"string"},"type":{"description":"Database type","enum":["mysql","postgresql","mongodb"],"type":"string"}},"required":["server","type","database","inputFile"],"type":"object"},"name":"ssh_db_import"},{"description":"Lists database objects on the remote server for the given engine without modifying anything. When database is provided it lists the tables (SQL) or collections (MongoDB) of that database; when omitted it lists all databases with common system databases filtered out. Supports mysql, postgresql, and mongodb. Returns the items and a count. Read-only and safe to call repeatedly.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"database":{"description":"Database name (if provided, lists tables/collections; if omitted, lists databases)","type":"string"},"dbHost":{"description":"Database host (default: localhost)","type":"string"},"dbPassword":{"description":"Database password","type":"string"},"dbPort":{"description":"Database port","type":"number"},"dbUser":{"description":"Database user","type":"string"},"server":{"description":"Server name","type":"string"},"type":{"description":"Database type","enum":["mysql","postgresql","mongodb"],"type":"string"}},"required":["server","type"],"type":"object"},"name":"ssh_db_list"},{"description":"Runs a read-only query against a remote database. For mysql and postgresql it is strictly limited to one SELECT statement: the query must begin with SELECT, and INTO, file functions, and any insert, update, delete, drop, create, alter, truncate, grant, revoke, or exec keyword are rejected before execution; it then runs inside a read-only transaction, so the database itself refuses any write. For mongodb it runs a find() and requires the collection parameter; the query must be a filter document (JSON or mongo shell syntax such as ObjectId(\"…\")), and $where, $function and $accumulator are refused. Returns the raw command output as text.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"collection":{"description":"Collection name (MongoDB only)","type":"string"},"database":{"description":"Database name","type":"string"},"dbHost":{"description":"Database host (default: localhost)","type":"string"},"dbPassword":{"description":"Database password","type":"string"},"dbPort":{"description":"Database port","type":"number"},"dbUser":{"description":"Database user","type":"string"},"query":{"description":"SQL query (SELECT only) or MongoDB find query","type":"string"},"server":{"description":"Server name","type":"string"},"type":{"description":"Database type","enum":["mysql","postgresql","mongodb"],"type":"string"}},"required":["server","type","database","query"],"type":"object"},"name":"ssh_db_query"}]}}}
