MCPcopy Create free account
hub / github.com/Noumena-Network/code / toolMatchesName

Function toolMatchesName

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

Source from the content-addressed store, hash-verified

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

Callers 15

submitMessageMethod · 0.85
hasActionableToolsFunction · 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