MCPcopy Create free account
hub / github.com/anomalyco/opencode / makeTool

Function makeTool

packages/opencode/test/tool/tool-define.test.ts:30–39  ·  view source on GitHub ↗
(id: string, executeFn?: () => void)

Source from the content-addressed store, hash-verified

28}
29
30function makeTool(id: string, executeFn?: () => void) {
31 return {
32 description: "test tool",
33 parameters: params,
34 execute() {
35 executeFn?.()
36 return Effect.succeed({ title: "test", output: "ok", metadata: {} })
37 },
38 }
39}
40
41describe("Tool.define", () => {
42 it.effect("object-defined tool does not mutate the original init object", () =>

Callers 2

generateObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected