ruvnet/ruflo · error · Error
roomLabel is required
Error message
roomLabel is required
What it means
validateRoomLabel() requires a non-empty string as roomLabel for agentbbs room operations; an empty string, undefined, null, or non-string value throws before anything is created. roomLabel is the human-facing room name (conventionally '#sales', '#finance') from which the deterministic roomId is derived.
Solutions
- Pass a non-empty roomLabel string, e.g. '#ops' — include the conventional leading '#'
- Check the exact key spelling ('roomLabel', camelCase) in the tool input
- If the label is user-supplied, require it in your form/validation layer before calling the tool
Example fix
// before — label missing
await callMCPTool('agentbbs_create_room', { roomId: '#ops' });
// after — correct parameter name
await callMCPTool('agentbbs_create_room', { roomLabel: '#ops' }); Defensive patterns
Strategy: validation
Validate before calling
function requireRoomLabel(label: unknown): string {
if (typeof label !== 'string' || label.length === 0) {
throw new Error('roomLabel is required (e.g. "#ops")');
}
return label;
} Type guard
const isRoomLabel = (v: unknown): v is string => typeof v === 'string' && v.length > 0;
Prevention
- Type the tool input (zod/typescript) so missing fields fail at your boundary
- Require the room-name field in UI forms before dispatch
- Use the exact camelCase key 'roomLabel'
When it happens
Trigger: Calling agentbbs room create/resolve tools with roomLabel omitted, set to '' after String coercion of undefined, or passed as a number/object; destructuring bugs that pass the wrong variable; LLM-composed calls that drop the field.
Common situations: Agent code forwarding optional UI input where the room name field was left blank; refactors renaming the parameter on one side but not the other; JSON payloads built with a typo'd key ('roomlabel').
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- roomId is required
- msgType is required
- roomId exceeds 128 chars
- roomId may only contain [A-Za-z0-9_.\\-:/@#]
- roomLabel exceeds 128 chars
AI-assisted analysis of ruvnet/ruflo@9c61c86f06 (2026-08-18).
Data as JSON: /api/errors/d7ae3af7d5acba2d.
Report an issue: GitHub.
Appendix: source
Thrown at v3/@claude-flow/cli/src/mcp-tools/agentbbs-tools.ts:99
}
return _cliAvailable;
}
function degradedResult(reason: string): { success: true; degraded: true; reason: string } {
return { success: true, degraded: true, reason };
}
function resolveBasePath(input?: string): string {
const p = input && typeof input === 'string' && input.length > 0
? input
: '.agentbbs';
if (/\.\.[\\/]|\0/.test(p)) throw new Error('basePath contains disallowed characters');
const abs = isAbsolute(p) ? p : resolve(getProjectCwd(), p);
return abs;
}
function validateRoomLabel(label: string): string {
if (!label || typeof label !== 'string') throw new Error('roomLabel is required');
if (label.length > 128) throw new Error('roomLabel exceeds 128 chars');
// Rooms are conventionally `#sales`, `#finance`, etc. — keep `#` in the allow-list.
if (!/^[A-Za-z0-9_.\-:/@#]+$/.test(label)) {
throw new Error('roomLabel may only contain [A-Za-z0-9_.\\-:/@#]');
}
return label;
}
function validateRoomId(roomId: string): string {
if (!roomId || typeof roomId !== 'string') throw new Error('roomId is required');
if (roomId.length > 128) throw new Error('roomId exceeds 128 chars');
if (!/^[A-Za-z0-9_.\-:/@#]+$/.test(roomId)) {
throw new Error('roomId may only contain [A-Za-z0-9_.\\-:/@#]');
}
return roomId;
}
function ensureDir(dir: string): void {View on GitHub (pinned to 9c61c86f06)