ruvnet/ruflo · error · Error

send action requires to, subject, and body

Error message

send action requires to, subject, and body

What it means

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.

Source

Thrown at v3/plugins/gastown-bridge/src/mcp-tools.ts:1439

  description: 'Send, read, or list Gas Town internal mail messages',
  category: 'gastown-bridge',
  version: '0.1.0',
  layer: 'cli',
  inputSchema: MailInputSchema,
  handler: async (input, context): Promise<MCPToolResult<MailResult>> => {
    const startTime = Date.now();

    try {
      const validated = MailInputSchema.parse(input);
      const bridge = context.bridges.gastown;

      let messages: GasTownMail[] | undefined;
      let sent_id: string | undefined;

      switch (validated.action) {
        case 'send':
          if (!validated.to || !validated.subject || !validated.body) {
            throw new Error('send action requires to, subject, and body');
          }
          sent_id = await bridge.sendMail(validated.to, validated.subject, validated.body);
          break;
        case 'read':
          if (!validated.mail_id) {
            throw new Error('read action requires mail_id');
          }
          messages = [await bridge.readMail(validated.mail_id)];
          break;
        case 'list':
          messages = await bridge.listMail(validated.limit);
          break;
      }

      const result: MailResult = {
        success: true,
        action: validated.action,
        messages,

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Inspect the underlying cause in logs, fix the root issue, and retry the operation.
  2. Validate inputs and preconditions before invoking this code path so the error is avoided.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at v3/plugins/gastown-bridge/src/mcp-tools.ts:1439 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/698789805fedcdeb. Report an issue: GitHub.