Class McpServerStdioHelp

java.lang.Object
org.snmp4j.mcp.server.stdio.help.McpServerStdioHelp

public class McpServerStdioHelp extends Object
Formats command-line help text for the MCP server stdio transport.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of McpServerStdioHelp.
  • Method Summary

    Modifier and Type
    Method
    Description
    help(String prefix, String command, boolean listOptionsDetails, boolean withDescription)
    Provides help information regarding available commands and their associated options.
    static String
    spaces(int n)
    Generates a string containing a specified number of space characters.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • McpServerStdioHelp

      public McpServerStdioHelp()
      Creates a new instance of McpServerStdioHelp.
  • Method Details

    • help

      public String help(String prefix, String command, boolean listOptionsDetails, boolean withDescription)
      Provides help information regarding available commands and their associated options. This method generates a help message that includes details about commands, their syntax, descriptions, subcommands, and available options depending on the provided parameters.
      Parameters:
      prefix - The prefix to prepend to command names; typically used for scoping.
      command - The specific command for which help is requested. If "all" or null, help for all commands is returned.
      listOptionsDetails - Specifies whether detailed options should be included in the help output.
      withDescription - Specifies whether command descriptions should be included in the help output.
      Returns:
      A string containing the generated help message with details about the commands, syntax, descriptions, and options as configured by the input arguments.
    • spaces

      public static String spaces(int n)
      Generates a string containing a specified number of space characters.
      Parameters:
      n - The number of space characters to include in the generated string. If the value is less than 0, it will be treated as 0.
      Returns:
      A string consisting of `n` space characters. If `n` is 0 or negative, an empty string is returned.