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

Function buildTool

src/Tool.ts:793–802  ·  view source on GitHub ↗
(def: D)

Source from the content-addressed store, hash-verified

791type AnyToolDef = ToolDef<any, any, any>
792
793export function buildTool<D extends AnyToolDef>(def: D): BuiltTool<D> {
794 // The runtime spread is straightforward; the `as` bridges the gap between
795 // the structural-any constraint and the precise BuiltTool<D> return. The
796 // type semantics are proven by the 0-error typecheck across all 60+ tools.
797 return {
798 ...TOOL_DEFAULTS,
799 userFacingName: () => def.name,
800 ...def,
801 } as BuiltTool<D>
802}

Callers 15

Tool.test.tsFile · 0.90
tool-chain.test.tsFile · 0.90
PowerShellTool.tsxFile · 0.85
GlobTool.tsFile · 0.85
TeamDeleteTool.tsFile · 0.85
SkillTool.tsFile · 0.85
ConfigTool.tsFile · 0.85
ListPeersTool.tsFile · 0.85
SubscribePRTool.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected