MCPcopy
hub / github.com/claude-code-best/claude-code / toolMatchesName

Function toolMatchesName

src/Tool.ts:358–363  ·  view source on GitHub ↗
(
  tool: { name: string; aliases?: string[] },
  name: string,
)

Source from the content-addressed store, hash-verified

356 * Checks if a tool matches the given name (primary name or alias).
357 */
358export function toolMatchesName(
359 tool: { name: string; aliases?: string[] },
360 name: string,
361): boolean {
362 return tool.name === name || (tool.aliases?.includes(name) ?? false)
363}
364
365/**
366 * Finds a tool by name or alias from a list of tools.

Callers 15

Tool.test.tsFile · 0.90
getToolsFunction · 0.70
submitMessageMethod · 0.70
findToolByNameFunction · 0.70
getDiagnosticAttachmentsFunction · 0.50
countBuiltInToolTokensFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected