{"record":{"id":"0fbd274674ba2d0d","repo":"ruvnet/ruflo","slug":"input-validation-failed-validation-errors-join","errorCode":null,"errorMessage":"Input validation failed: ${validation.errors?.join(', ')}","messagePattern":"Input validation failed: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/mcp/tool-registry.ts","lineNumber":398,"sourceCode":"    const startTime = performance.now();\n    const metadata = this.tools.get(name);\n\n    if (!metadata) {\n      return {\n        content: [{ type: 'text', text: `Tool not found: ${name}` }],\n        isError: true,\n      };\n    }\n\n    // Validate input against schema before execution (security boundary)\n    const validation = this.validateInput(input, metadata.tool.inputSchema);\n    if (!validation.valid) {\n      this.logger.warn('Tool input validation failed', {\n        name,\n        errors: validation.errors,\n      });\n      return {\n        content: [{ type: 'text', text: `Input validation failed: ${validation.errors?.join(', ')}` }],\n        isError: true,\n      };\n    }\n\n    const execContext = { ...this.defaultContext, ...context };\n    this.totalExecutions++;\n    metadata.callCount++;\n    metadata.lastCalled = new Date();\n\n    try {\n      this.emit('tool:called', { name, input });\n\n      const result = await metadata.tool.handler(input, execContext);\n\n      const duration = performance.now() - startTime;\n      this.updateAverageExecutionTime(metadata, duration);\n\n      this.logger.debug('Tool executed', {","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/mcp/tool-registry.ts#L380-L416","documentation":"Security-boundary guard in the MCP tool registry execute(): the supplied input failed JSON-schema validation against the tool's inputSchema before execution. The call is rejected with an isError result listing the schema errors; the tool body never runs.","triggerScenarios":"Tool call arguments fail the tool's input schema validation: wrong types, missing required fields, or constraint violations; the joined validator error list is included in the message.","commonSituations":"See trigger scenarios.","solutions":["Fix the tool call arguments to satisfy the tool's inputSchema as reported in validation.errors.","If the schema is wrong, correct the inputSchema definition in the tool registry.","Add clearer per-field validation messages so callers can see which argument failed."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}