{"record":{"id":"7512d41d22fabdb0","repo":"ruvnet/ruflo","slug":"missing-required-argument-arg-name","errorCode":null,"errorMessage":"Missing required argument: ${arg.name}","messagePattern":"Missing required argument: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/mcp/src/prompt-registry.ts","lineNumber":136,"sourceCode":"  }\n\n  /**\n   * Get a prompt with arguments\n   */\n  async get(\n    name: string,\n    args: Record<string, string> = {}\n  ): Promise<PromptGetResult> {\n    const prompt = this.prompts.get(name);\n    if (!prompt) {\n      throw new Error(`Prompt not found: ${name}`);\n    }\n\n    // Validate required arguments\n    if (this.options.validateArguments && prompt.arguments) {\n      for (const arg of prompt.arguments) {\n        if (arg.required && !(arg.name in args)) {\n          throw new Error(`Missing required argument: ${arg.name}`);\n        }\n      }\n    }\n\n    const messages = await prompt.handler(args);\n\n    this.emit('prompt:get', { name, argCount: Object.keys(args).length });\n\n    return {\n      description: prompt.description,\n      messages,\n    };\n  }\n\n  /**\n   * Get prompt by name\n   */\n  getPrompt(name: string): MCPPrompt | undefined {","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/mcp/src/prompt-registry.ts#L118-L154","documentation":"During PromptRegistry.get(), argument validation is enabled and one of the prompt's declared required arguments was absent from the caller's args object. The missing argument's name is included so the caller knows exactly what to supply before the prompt handler runs.","triggerScenarios":"Thrown at v3/@claude-flow/mcp/src/prompt-registry.ts:136 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply the required argument in the getPrompt call.","Mark the argument optional in the prompt definition if it is not truly required."],"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"}