earendil-works/pi · error · Error
Validation failed for tool "${toolCall.name}": ${errors} Re
Error message
Validation failed for tool "${toolCall.name}":
${errors}
Received arguments:
${JSON.stringify(toolCall.arguments, null, 2)} What it means
Error "Validation failed for tool "${toolCall.name}": ${errors} Received arguments: ${JSON.stringify(toolCall.arguments, null, 2)}" thrown in earendil-works/pi.
Source
Thrown at packages/ai/src/utils/validation.ts:349
} else {
return validator.Check(coerced) ? coerced : args;
}
}
}
if (validator.Check(args)) {
return args;
}
const errors =
validator
.Errors(args)
.map((error) => ` - ${formatValidationPath(error)}: ${error.message}`)
.join("\n") || "Unknown validation error";
const errorMessage = `Validation failed for tool "${toolCall.name}":\n${errors}\n\nReceived arguments:\n${JSON.stringify(toolCall.arguments, null, 2)}`;
throw new Error(errorMessage);
}
View on GitHub (pinned to 4af9d21d3b)
Solutions
- Fix the tool call arguments so they satisfy the schema errors listed in the message.
When it happens
Trigger: Thrown at packages/ai/src/utils/validation.ts:349 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/425f4de4b94bffb4.
Report an issue: GitHub.