MCPcopy
hub / github.com/anomalyco/opencode / errorTool

Function errorTool

packages/opencode/test/session/prompt.test.ts:106–110  ·  view source on GitHub ↗
(parts: SessionV1.Part[])

Source from the content-addressed store, hash-verified

104}
105
106function errorTool(parts: SessionV1.Part[]) {
107 const part = toolPart(parts)
108 expect(part?.state.status).toBe("error")
109 return part?.state.status === "error" ? (part as ErrorToolPart) : undefined
110}
111
112function makeMcp(instructions: MCP.ServerInstructions[] = []) {
113 return Layer.succeed(

Callers 1

prompt.test.tsFile · 0.70

Calls 1

toolPartFunction · 0.70

Tested by

no test coverage detected