Skip to main content
Glama
qq418716640

BotBell MCP Server

botbell_send

Send push notifications with interactive buttons to iPhone/Mac devices for alerts, reminders, and quick user responses.

Instructions

Send a push notification to the user's iPhone/Mac via BotBell. You can include action buttons for quick replies. Use type 'input' to let the user type a custom response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesMessage content (required, max 4096 chars)
titleNoMessage title (optional)
urlNoURL to attach (optional)
image_urlNoImage URL to attach (optional)
summaryNoCustom summary for long messages (optional, max 512 chars)
formatNoMessage format: 'text' (default) or 'markdown' for Markdown rendering
actions_descriptionNoDescription text shown above action buttons (optional, max 256 chars)
actionsNoQuick reply buttons (max 5). Use type 'input' for free-text option.
reply_modeNoControls how the recipient can reply: 'open' (default, free text + actions), 'actions_only' (only action buttons, no free text), 'none' (pure notification, no reply)

Implementation Reference

  • Handler for 'botbell_send' in PAT mode (using bot_id or alias).
    server.tool(
      "botbell_send",
      "Send a push notification to the user's iPhone/Mac via BotBell. " +
      (hasExtras
        ? "Use bot_id for your own bots or alias for external bots. Use botbell_list_bots to see all available targets. "
        : "Use botbell_list_bots first to find the bot_id. ") +
      "You can include action buttons for quick replies. Use type 'input' to let the user type a custom response.",
      sendSchema,
      async (args) => {
        try {
          const { bot_id, alias, ...msgArgs } = args as {
            bot_id?: string; alias?: string;
            message: string; title?: string; url?: string;
            image_url?: string; summary?: string; format?: string;
            actions_description?: string; actions?: unknown[];
            reply_mode?: string;
          };
          const body = buildMessageBody(msgArgs);
    
          // Route via alias (extra token)
          if (alias) {
            const btToken = resolveAlias(alias);
            if (!btToken) return errorResult(`Unknown alias "${alias}". Available: ${aliasNames.join(", ")}`);
            return await sendViaBotToken(btToken, apiBase, body);
          }
    
          // Route via bot_id (PAT)
          if (!bot_id) return errorResult("Provide either bot_id or alias.");
          const result = await api("POST", `/bots/${bot_id}/push`, body);
          if (!result.ok) return errorResult(`Failed to send: ${handleApiError(result)}`);
    
          const data = result.data.data as Record<string, unknown>;
          return textResult(
            `Notification sent successfully.\n` +
            `Message ID: ${data.message_id}\n` +
            `Delivered: ${data.delivered}\n` +
            `Timestamp: ${data.timestamp}`
          );
        } catch (error) {
          return errorResult(`Error: ${error instanceof Error ? error.message : String(error)}`);
        }
      }
    );
  • Handler for 'botbell_send' in Bot token mode (using default token or alias).
    server.tool(
      "botbell_send",
      "Send a push notification to the user's iPhone/Mac via BotBell. " +
      (hasExtras ? `You can also send via external bots: ${aliasNames.join(", ")}. ` : "") +
      "You can include action buttons for quick replies. Use type 'input' to let the user type a custom response.",
      sendSchema,
      async (args) => {
        try {
          const { alias, ...msgArgs } = args as {
            alias?: string;
            message: string; title?: string; url?: string;
            image_url?: string; summary?: string; format?: string;
            actions_description?: string; actions?: unknown[];
            reply_mode?: string;
          };
          const body = buildMessageBody(msgArgs);
    
          // Route via alias (extra token)
          if (alias) {
            const btToken = resolveAlias(alias);
            if (!btToken) return errorResult(`Unknown alias "${alias}". Available: ${aliasNames.join(", ")}`);
            return await sendViaBotToken(btToken, apiBase, body);
          }
    
          // Default: primary bot token
          return await sendViaBotToken(token, apiBase, body);
        } catch (error) {
          return errorResult(`Error: ${error instanceof Error ? error.message : String(error)}`);
        }
      }
    );
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/qq418716640/botbell-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server