MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / findToolByName

Function findToolByName

restored-src/src/Tool.ts:358–360  ·  view source on GitHub ↗
(tools: Tools, name: string)

Source from the content-addressed store, hash-verified

356 * Finds a tool by name or alias from a list of tools.
357 */
358export function findToolByName(tools: Tools, name: string): Tool | undefined {
359 return tools.find(t => toolMatchesName(t, name))
360}
361
362export type Tool<
363 Input extends AnyObject = AnyObject,

Callers 15

queryLoopFunction · 0.85
ToolSearchTool.tsFile · 0.85
callFunction · 0.85
extractLastToolInfoFunction · 0.85
MessagesImplFunction · 0.85
VerboseToolUseFunction · 0.85
AssistantToolUseMessageFunction · 0.85
GroupedToolUseContentFunction · 0.85
useGetToolFromMessagesFunction · 0.85
renderToolActivityFunction · 0.85
handleOrphanedPermissionFunction · 0.85

Calls 2

toolMatchesNameFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected