Mark it as non-destructive

This commit is contained in:
2026-05-24 14:34:40 -07:00
parent 3fd16204bf
commit 9d05553df9

View File

@@ -20,7 +20,7 @@ public sealed class SshTools
_sftpService = sftpService;
}
[McpServerTool(Name = "ssh_exec", Destructive = true)]
[McpServerTool(Name = "ssh_exec", Destructive = false)]
[Description("Execute a single command over SSH using key-based authentication.")]
public Task<SshExecResult> ExecuteAsync(
[Description("Remote hostname or IP address. OpenSSH aliases are not supported in this vertical slice.")] string host,
@@ -36,7 +36,7 @@ public sealed class SshTools
return _sshExecService.ExecuteAsync(host, username, command, port, cwd, keyPath, keyPassphrase, timeoutSeconds, cancellationToken);
}
[McpServerTool(Name = "ssh_terminal_start", Destructive = true)]
[McpServerTool(Name = "ssh_terminal_start", Destructive = false)]
[Description("Start a persistent SSH PTY shell session using key-based authentication.")]
public Task<TerminalStartResult> StartTerminalAsync(
[Description("Remote hostname or IP address. OpenSSH aliases are not supported in this vertical slice.")] string host,
@@ -52,7 +52,7 @@ public sealed class SshTools
return _terminalSessionManager.StartAsync(host, username, cols, rows, port, keyPath, keyPassphrase, idleTimeoutSeconds, cancellationToken);
}
[McpServerTool(Name = "ssh_terminal_write", Destructive = true)]
[McpServerTool(Name = "ssh_terminal_write", Destructive = false)]
[Description("Write input to an active SSH terminal session.")]
public TerminalWriteResult WriteTerminal(
[Description("Terminal session ID returned by terminal_start.")] string sessionId,
@@ -70,7 +70,7 @@ public sealed class SshTools
return _terminalSessionManager.Read(sessionId, maxBytes);
}
[McpServerTool(Name = "ssh_terminal_stop", Destructive = true)]
[McpServerTool(Name = "ssh_terminal_stop", Destructive = false)]
[Description("Stop and remove an SSH terminal session.")]
public TerminalStopResult StopTerminal(
[Description("Terminal session ID returned by terminal_start.")] string sessionId)
@@ -109,7 +109,7 @@ public sealed class SshTools
return _sftpService.GetAsync(host, username, remotePath, localPath, port, keyPath, keyPassphrase, overwrite, maxBytes, cancellationToken);
}
[McpServerTool(Name = "sftp_put", Destructive = true)]
[McpServerTool(Name = "sftp_put", Destructive = false)]
[Description("Upload a local file using SFTP, silently falling back to SCP when SFTP is unavailable.")]
public Task<SftpTransferResult> PutSftpAsync(
[Description("Remote hostname or IP address. OpenSSH aliases are not supported in this vertical slice.")] string host,