{"record":{"id":"698789805fedcdeb","repo":"ruvnet/ruflo","slug":"send-action-requires-to-subject-and-body","errorCode":null,"errorMessage":"send action requires to, subject, and body","messagePattern":"send action requires to, subject, and body","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/gastown-bridge/src/mcp-tools.ts","lineNumber":1439,"sourceCode":"  description: 'Send, read, or list Gas Town internal mail messages',\n  category: 'gastown-bridge',\n  version: '0.1.0',\n  layer: 'cli',\n  inputSchema: MailInputSchema,\n  handler: async (input, context): Promise<MCPToolResult<MailResult>> => {\n    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,","sourceCodeStart":1421,"sourceCodeEnd":1457,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/gastown-bridge/src/mcp-tools.ts#L1421-L1457","documentation":"The mail tool's 'send' action validated its input and at least one of to, subject, or body is missing. The per-action guard fires after zod parsing because the schema permits them optional while the send action requires all three.","triggerScenarios":"Thrown at v3/plugins/gastown-bridge/src/mcp-tools.ts:1439 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-14T00:17:10.932Z"}