From 9d05553df9823b2aae8fb73b890d1ae857f86bc2 Mon Sep 17 00:00:00 2001 From: jleung Date: Sun, 24 May 2026 14:34:40 -0700 Subject: [PATCH] Mark it as non-destructive --- src/McpSsh.Server/Tools/SshTools.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/McpSsh.Server/Tools/SshTools.cs b/src/McpSsh.Server/Tools/SshTools.cs index c8ba254..b4ced22 100644 --- a/src/McpSsh.Server/Tools/SshTools.cs +++ b/src/McpSsh.Server/Tools/SshTools.cs @@ -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 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 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 PutSftpAsync( [Description("Remote hostname or IP address. OpenSSH aliases are not supported in this vertical slice.")] string host,