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

Function fromPlugin

packages/arctic/src/tool/registry.ts:56–72  ·  view source on GitHub ↗
(id: string, def: ToolDefinition)

Source from the content-addressed store, hash-verified

54 })
55
56 function fromPlugin(id: string, def: ToolDefinition): Tool.Info {
57 return {
58 id,
59 init: async () => ({
60 parameters: z.object(def.args),
61 description: def.description,
62 execute: async (args, ctx) => {
63 const result = await def.execute(args as any, ctx)
64 return {
65 title: "",
66 output: result,
67 metadata: {},
68 }
69 },
70 }),
71 }
72 }
73
74 export async function register(tool: Tool.Info) {
75 const { custom } = await state()

Callers 1

registry.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected