{"record":{"id":"425f4de4b94bffb4","repo":"earendil-works/pi","slug":"validation-failed-for-tool-toolcall-name-e","errorCode":null,"errorMessage":"Validation failed for tool \"${toolCall.name}\":\n${errors}\n\nReceived arguments:\n${JSON.stringify(toolCall.arguments, null, 2)}","messagePattern":"Validation failed for tool \"(.+?)\":\n(.+?)\n\nReceived arguments:\n(.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/ai/src/utils/validation.ts","lineNumber":349,"sourceCode":"\t\t\t} else {\n\t\t\t\treturn validator.Check(coerced) ? coerced : args;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (validator.Check(args)) {\n\t\treturn args;\n\t}\n\n\tconst errors =\n\t\tvalidator\n\t\t\t.Errors(args)\n\t\t\t.map((error) => `  - ${formatValidationPath(error)}: ${error.message}`)\n\t\t\t.join(\"\\n\") || \"Unknown validation error\";\n\n\tconst errorMessage = `Validation failed for tool \"${toolCall.name}\":\\n${errors}\\n\\nReceived arguments:\\n${JSON.stringify(toolCall.arguments, null, 2)}`;\n\n\tthrow new Error(errorMessage);\n}\n","sourceCodeStart":331,"sourceCodeEnd":351,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/ai/src/utils/validation.ts#L331-L351","documentation":"Error \"Validation failed for tool \"${toolCall.name}\":\n${errors}\n\nReceived arguments:\n${JSON.stringify(toolCall.arguments, null, 2)}\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/ai/src/utils/validation.ts:349 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the tool call arguments so they satisfy the schema errors listed in the message."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}