Skip to main content

tool_name_to_subcommand

Function tool_name_to_subcommand 

Source
pub fn tool_name_to_subcommand(tool_name: &str) -> String
Expand description

Convert a snake_case or camelCase MCP tool name to a kebab-case CLI subcommand.

§Rules

  1. Insert a hyphen before each uppercase-to-lowercase camelCase transition.
  2. Replace all underscores with hyphens.
  3. Lowercase the entire result.

§Examples

InputOutput
get_confluence_pageget-confluence-page
getConfluencePageget-confluence-page
createJiraIssuecreate-jira-issue
fetchfetch
getjiraissuegetjiraissue