MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / buildTool

Function buildTool

source code/Tool.ts:785–794  ·  view source on GitHub ↗
(def: D)

Source from the content-addressed store, hash-verified

783type AnyToolDef = ToolDef<any, any, any>
784
785export function buildTool<D extends AnyToolDef>(def: D): BuiltTool<D> {
786 // The runtime spread is straightforward; the `as` bridges the gap between
787 // the structural-any constraint and the precise BuiltTool<D> return. The
788 // type semantics are proven by the 0-error typecheck across all 60+ tools.
789 return {
790 ...TOOL_DEFAULTS,
791 userFacingName: () => def.name,
792 ...def,
793 } as BuiltTool<D>
794}

Callers 15

PowerShellTool.tsxFile · 0.85
GlobTool.tsFile · 0.85
TeamDeleteTool.tsFile · 0.85
SkillTool.tsFile · 0.85
ConfigTool.tsFile · 0.85
TaskCreateTool.tsFile · 0.85
TaskGetTool.tsFile · 0.85
ToolSearchTool.tsFile · 0.85
FileReadTool.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected