ruvnet/ruflo · error · Error

Parameter '${name}' exceeds maximum length of ${maxLength}

Error message

Parameter '${name}' exceeds maximum length of ${maxLength}

What it means

MCP input-validation helper: validateStringParam() received a string longer than maxLength (default MAX_PARAM_LENGTH from MCP_PARAM_LIMITS) for the named parameter. This bounds untrusted tool-argument size to prevent memory/DoS abuse via oversized strings.

Source

Thrown at v3/plugins/teammate-plugin/src/mcp-tools.ts:39

import { MCP_PARAM_LIMITS } from './types.js';

// Use centralized security constants from types.ts
const { MAX_PARAM_LENGTH, MAX_ARRAY_ITEMS } = MCP_PARAM_LIMITS;

// ============================================================================
// Input Validation
// ============================================================================

/**
 * Validate string parameter
 */
function validateStringParam(value: unknown, name: string, maxLength: number = MAX_PARAM_LENGTH): string {
  if (typeof value !== 'string') {
    throw new Error(`Parameter '${name}' must be a string`);
  }
  if (value.length > maxLength) {
    throw new Error(`Parameter '${name}' exceeds maximum length of ${maxLength}`);
  }
  return value;
}

/**
 * Validate array parameter
 */
function validateArrayParam<T>(value: unknown, name: string, maxItems: number = MAX_ARRAY_ITEMS): T[] {
  if (!Array.isArray(value)) {
    throw new Error(`Parameter '${name}' must be an array`);
  }
  if (value.length > maxItems) {
    throw new Error(`Parameter '${name}' exceeds maximum of ${maxItems} items`);
  }
  return value as T[];
}

// ============================================================================

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Reduce the input size/depth below the documented limit, or batch the input into smaller chunks.
  2. Validate the limit before processing and report the measured versus allowed value to the caller.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at v3/plugins/teammate-plugin/src/mcp-tools.ts:39 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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