* Formats MCP tool name from internal format to display format * @param {string} toolName - The raw tool name (e.g., mcp__github__search_issues) * @returns {string} Formatted tool name (e.g., github::search_issues)
(toolName)
| 213 | * @returns {string} Formatted tool name (e.g., github::search_issues) |
| 214 | */ |
| 215 | function formatMcpName(toolName) { |
| 216 | // Convert mcp__github__search_issues to github::search_issues |
| 217 | if (toolName.startsWith("mcp__")) { |
| 218 | const parts = toolName.split("__"); |
| 219 | if (parts.length >= 3) { |
| 220 | const provider = parts[1]; // github, etc. |
| 221 | const method = parts.slice(2).join("_"); // search_issues, etc. |
| 222 | return `${provider}::${method}`; |
| 223 | } |
| 224 | } |
| 225 | return toolName; |
| 226 | } |
| 227 | |
| 228 | /** |
| 229 | * Checks if a tool name looks like a custom agent (kebab-case with multiple words) |
no outgoing calls
no test coverage detected