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

Function toolMatchesName

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

Source from the content-addressed store, hash-verified

346 * Checks if a tool matches the given name (primary name or alias).
347 */
348export 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.

Callers 15

getToolsFunction · 0.85
submitMessageMethod · 0.85
findToolByNameFunction · 0.85
filterToolsForAgentFunction · 0.85
callFunction · 0.85
callFunction · 0.85
getDiagnosticAttachmentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected