(tool: {
name: string
mcpInfo?: { serverName: string; toolName: string }
})
| 58 | * replacements that share the same display name. Falls back to `tool.name`. |
| 59 | */ |
| 60 | export function getToolNameForPermissionCheck(tool: { |
| 61 | name: string |
| 62 | mcpInfo?: { serverName: string; toolName: string } |
| 63 | }): string { |
| 64 | return tool.mcpInfo |
| 65 | ? buildMcpToolName(tool.mcpInfo.serverName, tool.mcpInfo.toolName) |
| 66 | : tool.name |
| 67 | } |
| 68 | |
| 69 | /* |
| 70 | * Extracts the display name from an MCP tool/command name |
no test coverage detected