ruvnet/ruflo · error · Error

Parameter '${name}' must be a string

Error message

Parameter '${name}' must be a string

What it means

MCP input-validation helper: validateStringParam() received a value whose typeof is not 'string' for the named parameter (e.g. name, role, prompt, teamName, fromId, toId). Tool arguments came from untrusted JSON-RPC input and failed the type check before any business logic ran.

Source

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

  TeleportTarget,
  MessageType,
} from './types.js';

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. Pass a string value for this parameter; coerce or reject non-string input before validation.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at v3/plugins/teammate-plugin/src/mcp-tools.ts:36 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/a30a22aba9e5bd6d. Report an issue: GitHub.