MCPcopy Create free account
hub / github.com/Waishnav/devspace / formatToolError

Function formatToolError

src/pi-tools.ts:48–51  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

46}
47
48function formatToolError(error: unknown): McpContent[] {
49 const message = error instanceof Error ? error.message : String(error);
50 return [{ type: "text", text: message }];
51}
52
53async function runTool<TInput, TDetails = unknown>(
54 execute: (input: TInput) => Promise<AgentToolResult<TDetails>>,

Callers 1

runToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected