MCPcopy Index your code
hub / github.com/codeaashu/claude-code / buildTool

Function buildTool

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

Source from the content-addressed store, hash-verified

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