Skip to main content

Module tools

Module tools 

Source
Expand description

MCP Tools module

This module previously provided separate tool classes with #[tool_router]. Now, tools are implemented directly in the SshMcpServer via ServerHandler trait.

Available tools:

  • exec - Execute shell commands on the remote SSH server
  • sudo-exec - Execute shell commands with sudo privileges
  • check-process - Check if a process is still running and read its log
  • read-file - Read UTF-8 text files from the remote SSH server
  • write-file - Atomically overwrite or create a remote file
  • replace-in-file - Atomically replace text in a remote file

See server.rs for the implementation.

Structs§

CheckProcessParams
Parameters for the check-process tool
ExecParams
Parameters for the exec tool
ReadFileParams
ReplaceInFileParams
Parameters for the replace-in-file tool
SudoExecParams
Parameters for the sudo-exec tool
WriteFileParams
Parameters for the write-file tool

Enums§

ReadFileMode
Parameters for the read-file tool