ruvnet/ruflo · error

Input validation failed: ${validation.errors?.join(', ')}

Error message

Input validation failed: ${validation.errors?.join(', ')}

What it means

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.

Source

Thrown at v3/mcp/tool-registry.ts:398

    const startTime = performance.now();
    const metadata = this.tools.get(name);

    if (!metadata) {
      return {
        content: [{ type: 'text', text: `Tool not found: ${name}` }],
        isError: true,
      };
    }

    // Validate input against schema before execution (security boundary)
    const validation = this.validateInput(input, metadata.tool.inputSchema);
    if (!validation.valid) {
      this.logger.warn('Tool input validation failed', {
        name,
        errors: validation.errors,
      });
      return {
        content: [{ type: 'text', text: `Input validation failed: ${validation.errors?.join(', ')}` }],
        isError: true,
      };
    }

    const execContext = { ...this.defaultContext, ...context };
    this.totalExecutions++;
    metadata.callCount++;
    metadata.lastCalled = new Date();

    try {
      this.emit('tool:called', { name, input });

      const result = await metadata.tool.handler(input, execContext);

      const duration = performance.now() - startTime;
      this.updateAverageExecutionTime(metadata, duration);

      this.logger.debug('Tool executed', {

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Fix the tool call arguments to satisfy the tool's inputSchema as reported in validation.errors.
  2. If the schema is wrong, correct the inputSchema definition in the tool registry.
  3. Add clearer per-field validation messages so callers can see which argument failed.
Defensive patterns

Strategy: validation

When it happens

Trigger: 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.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/0fbd274674ba2d0d. Report an issue: GitHub.