MCPcopy Create free account
hub / github.com/arctic-cli/interface / register

Function register

packages/arctic/src/tool/registry.ts:74–82  ·  view source on GitHub ↗
(tool: Tool.Info)

Source from the content-addressed store, hash-verified

72 }
73
74 export async function register(tool: Tool.Info) {
75 const { custom } = await state()
76 const idx = custom.findIndex((t) => t.id === tool.id)
77 if (idx >= 0) {
78 custom.splice(idx, 1, tool)
79 return
80 }
81 custom.push(tool)
82 }
83
84 async function all(): Promise<Tool.Info[]> {
85 const custom = await state().then((x) => x.custom)

Callers

nothing calls this directly

Calls 2

stateFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected