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

Function buildTool

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

Source from the content-addressed store, hash-verified

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

Callers 15

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
TaskCreateTool.tsFile · 0.85
SleepTool.tsFile · 0.85

Calls

no outgoing calls

Tested by 1

createFakeToolFunction · 0.68