{"record":{"id":"134cd887aafb18d4","repo":"ruvnet/ruflo","slug":"parameter-name-exceeds-maximum-length-of-ma","errorCode":null,"errorMessage":"Parameter '${name}' exceeds maximum length of ${maxLength}","messagePattern":"Parameter '(.+?)' exceeds maximum length of (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/teammate-plugin/src/mcp-tools.ts","lineNumber":39,"sourceCode":"\nimport { MCP_PARAM_LIMITS } from './types.js';\n\n// Use centralized security constants from types.ts\nconst { MAX_PARAM_LENGTH, MAX_ARRAY_ITEMS } = MCP_PARAM_LIMITS;\n\n// ============================================================================\n// Input Validation\n// ============================================================================\n\n/**\n * Validate string parameter\n */\nfunction validateStringParam(value: unknown, name: string, maxLength: number = MAX_PARAM_LENGTH): string {\n  if (typeof value !== 'string') {\n    throw new Error(`Parameter '${name}' must be a string`);\n  }\n  if (value.length > maxLength) {\n    throw new Error(`Parameter '${name}' exceeds maximum length of ${maxLength}`);\n  }\n  return value;\n}\n\n/**\n * Validate array parameter\n */\nfunction validateArrayParam<T>(value: unknown, name: string, maxItems: number = MAX_ARRAY_ITEMS): T[] {\n  if (!Array.isArray(value)) {\n    throw new Error(`Parameter '${name}' must be an array`);\n  }\n  if (value.length > maxItems) {\n    throw new Error(`Parameter '${name}' exceeds maximum of ${maxItems} items`);\n  }\n  return value as T[];\n}\n\n// ============================================================================","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/teammate-plugin/src/mcp-tools.ts#L21-L57","documentation":"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.","triggerScenarios":"Thrown at v3/plugins/teammate-plugin/src/mcp-tools.ts:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the input size/depth below the documented limit, or batch the input into smaller chunks.","Validate the limit before processing and report the measured versus allowed value to the caller."],"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-14T05:17:10.506Z"}