Skip to main content

humanize_tool_name

Function humanize_tool_name 

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

Human fallback for tool names the headline readers cannot phrase.

Strips MCP prefixes, then splits snake_case and PascalCase/camelCase boundaries into capitalized words (DiagramCommand → Diagram Command, diagram_render → Diagram Render). Only the first letter of each word is touched, so acronyms (MCP) and versions (v2) survive. Never returns blank: a name with no word characters falls back to itself.