Skip to main content
Glama
qq418716640

BotBell MCP Server

botbell_get_replies

Fetch user replies from BotBell notifications to enable interactive AI conversations. Retrieve responses to your messages for processing follow-up actions.

Instructions

Check if the user has replied to your messages in the BotBell app. Messages are consumed on fetch (won't be returned again).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax number of replies to fetch (default 20, max 100)

Implementation Reference

  • Tool registration and handler implementation for 'botbell_get_replies' when bot_id is available.
    server.tool(
      "botbell_get_replies",
      "Check if the user has replied to messages in the BotBell app. " +
      (hasExtras
        ? "Use bot_id for your own bots or alias for external bots. "
        : "Use botbell_list_bots first to find the bot_id. ") +
      "Messages are consumed on fetch (won't be returned again).",
      repliesSchema,
      async (args) => {
        try {
          const { bot_id, alias, limit } = args as { bot_id?: string; alias?: string; limit: number };
    
          // Route via alias
          if (alias) {
            const btToken = resolveAlias(alias);
            if (!btToken) return errorResult(`Unknown alias "${alias}". Available: ${aliasNames.join(", ")}`);
            return await pollViaBotToken(btToken, apiBase, limit);
          }
    
          // Route via bot_id (PAT)
          if (!bot_id) return errorResult("Provide either bot_id or alias.");
          const result = await api("GET", `/bots/${bot_id}/replies?limit=${limit}`);
          if (!result.ok) return errorResult(`Failed to fetch replies: ${handleApiError(result)}`);
    
          const data = result.data.data as { messages: Array<Record<string, unknown>> };
          const messages = data.messages;
    
          if (!messages || messages.length === 0) {
            return textResult("No new replies.");
          }
    
          const text = messages.map(formatPollMessage).join("\n");
    
          return textResult(`${messages.length} new reply(s):\n\n${text}`);
        } catch (error) {
          return errorResult(`Error: ${error instanceof Error ? error.message : String(error)}`);
        }
      }
    );
  • Alternative tool registration and handler implementation for 'botbell_get_replies' for cases without bot_id.
    server.tool(
      "botbell_get_replies",
      "Check if the user has replied to your messages in the BotBell app. " +
      "Messages are consumed on fetch (won't be returned again).",
      repliesSchema,
      async (args) => {
        try {
          const { alias, limit } = args as { alias?: string; limit: number };
    
          if (alias) {
            const btToken = resolveAlias(alias);
            if (!btToken) return errorResult(`Unknown alias "${alias}". Available: ${aliasNames.join(", ")}`);
            return await pollViaBotToken(btToken, apiBase, limit);
          }
    
          return await pollViaBotToken(token, apiBase, limit);
        } catch (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