Skip to main content
Glama
acquo

LINE Bot MCP Server (SSE Support)

by acquo

push_text_message

Send plain text messages to LINE users through the LINE Bot MCP Server. This tool enables AI agents to communicate with users via text without formatting.

Instructions

Push a simple text message to a user via LINE. Use this for sending plain text messages without formatting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdNoThe user ID to receive a message. Defaults to DESTINATION_USER_ID.
messageYes

Implementation Reference

  • The tool execution handler that calls the messaging API.
    async ({ userId, message }) => {
      if (!userId) {
        return createErrorResponse(NO_USER_ID_ERROR);
      }
    
      try {
        const response = await this.client.pushMessage({
          to: userId,
          messages: [message as unknown as messagingApi.Message],
        });
        return createSuccessResponse(response);
      } catch (error) {
        return createErrorResponse(
          `Failed to push message: ${error.message}`,
        );
      }
    },
  • Tool registration using server.tool.
    server.tool(
      "push_text_message",
      "Push a simple text message to a user via LINE. Use this for sending plain text messages without formatting.",
      {
        userId: userIdSchema,
        message: textMessageSchema,
      },
      async ({ userId, message }) => {
        if (!userId) {
          return createErrorResponse(NO_USER_ID_ERROR);
        }
    
        try {
          const response = await this.client.pushMessage({
            to: userId,
            messages: [message as unknown as messagingApi.Message],
          });
          return createSuccessResponse(response);
        } catch (error) {
          return createErrorResponse(
            `Failed to push message: ${error.message}`,
          );
        }
      },
    );

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/acquo/line-bot-mcp-server-sse'

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