| 1 | import { MCPServerStatus, MCPTool } from ".."; |
| 2 | |
| 3 | export function getMCPToolName(server: MCPServerStatus, tool: MCPTool) { |
| 4 | const serverPrefix = server.name.split(" ").join("_").toLowerCase(); |
| 5 | if (tool.name.startsWith(serverPrefix)) { |
| 6 | return tool.name; |
| 7 | } |
| 8 | return `${serverPrefix}_${tool.name}`; |
| 9 | } |