{"record":{"id":"e916a04bae16be76","repo":"ruvnet/ruflo","slug":"read-action-requires-mail-id","errorCode":null,"errorMessage":"read action requires mail_id","messagePattern":"read action requires mail_id","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/gastown-bridge/src/mcp-tools.ts","lineNumber":1445,"sourceCode":"    const startTime = Date.now();\n\n    try {\n      const validated = MailInputSchema.parse(input);\n      const bridge = context.bridges.gastown;\n\n      let messages: GasTownMail[] | undefined;\n      let sent_id: string | undefined;\n\n      switch (validated.action) {\n        case 'send':\n          if (!validated.to || !validated.subject || !validated.body) {\n            throw new Error('send action requires to, subject, and body');\n          }\n          sent_id = await bridge.sendMail(validated.to, validated.subject, validated.body);\n          break;\n        case 'read':\n          if (!validated.mail_id) {\n            throw new Error('read action requires mail_id');\n          }\n          messages = [await bridge.readMail(validated.mail_id)];\n          break;\n        case 'list':\n          messages = await bridge.listMail(validated.limit);\n          break;\n      }\n\n      const result: MailResult = {\n        success: true,\n        action: validated.action,\n        messages,\n        sent_id,\n        durationMs: Date.now() - startTime,\n      };\n\n      return {\n        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],","sourceCodeStart":1427,"sourceCodeEnd":1463,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/gastown-bridge/src/mcp-tools.ts#L1427-L1463","documentation":"The mail tool's 'read' action was invoked without a mail_id. The schema leaves mail_id optional for the other actions, so this per-action guard enforces its presence specifically for reading a message.","triggerScenarios":"Thrown at v3/plugins/gastown-bridge/src/mcp-tools.ts:1445 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying cause in logs, fix the root issue, and retry the operation.","Validate inputs and preconditions before invoking this code path so the error is avoided."],"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"}