( command: Command, serverName: string, )
| 50 | * either shape. |
| 51 | */ |
| 52 | export function commandBelongsToServer( |
| 53 | command: Command, |
| 54 | serverName: string, |
| 55 | ): boolean { |
| 56 | const normalized = normalizeNameForMCP(serverName) |
| 57 | const name = command.name |
| 58 | if (!name) return false |
| 59 | return ( |
| 60 | name.startsWith(`mcp__${normalized}__`) || name.startsWith(`${normalized}:`) |
| 61 | ) |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Filters commands by MCP server name |
no test coverage detected