(
tool: { name: string; aliases?: string[] },
name: string,
)
| 346 | * Checks if a tool matches the given name (primary name or alias). |
| 347 | */ |
| 348 | export function toolMatchesName( |
| 349 | tool: { name: string; aliases?: string[] }, |
| 350 | name: string, |
| 351 | ): boolean { |
| 352 | return tool.name === name || (tool.aliases?.includes(name) ?? false) |
| 353 | } |
| 354 | |
| 355 | /** |
| 356 | * Finds a tool by name or alias from a list of tools. |
no outgoing calls
no test coverage detected