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:

  • shell - Execute shell commands on the remote SSH server
  • sudo_shell - Execute shell commands with sudo privileges
  • check_process - Check if a process is still running and read its log
  • read - Read UTF-8 text files from the remote SSH server
  • apply_patch - Create, update, or delete one remote UTF-8 text file
  • sudo_apply_patch - Apply the same exact patch under sudo

See server.rs for the implementation.

Structs§

ApplyPatchParams
Parameters for the apply_patch tool
CheckProcessParams
Parameters for the check_process tool
ExecParams
Parameters for the shell tool
ReadFileParams
SudoExecParams
Parameters for the sudo_shell tool

Enums§

ReadFileMode
Parameters for the read tool