Skip to main content
Glama

broadcast_text_message

Send plain text messages to all followers of a LINE Official Account for announcements or updates using the LINE Bot MCP Server.

Instructions

Broadcast a simple text message via LINE to all users who have followed your LINE Official Account. Use this for sending plain text messages without formatting. Please be aware that this message will be sent to all users.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes

Implementation Reference

  • The asynchronous handler function that executes the broadcast_text_message tool logic, using the LINE messaging API to broadcast the message to all users.
    async ({ message }) => { try { const response = await this.client.broadcast({ messages: [message as unknown as messagingApi.Message], }); return createSuccessResponse(response); } catch (error) { return createErrorResponse( `Failed to broadcast message: ${error.message}`, ); } },
  • Registers the 'broadcast_text_message' tool on the MCP server, specifying name, description, input schema, and handler function.
    server.tool( "broadcast_text_message", "Broadcast a simple text message via LINE to all users who have followed your LINE Official Account. Use this for sending " + "plain text messages without formatting. Please be aware that this message will be sent to all users.", { message: textMessageSchema, }, async ({ message }) => { try { const response = await this.client.broadcast({ messages: [message as unknown as messagingApi.Message], }); return createSuccessResponse(response); } catch (error) { return createErrorResponse( `Failed to broadcast message: ${error.message}`, ); } }, );
  • Zod schema defining the input structure for the text message parameter.
    export const textMessageSchema = z.object({ type: z.literal("text").default("text"), text: z .string() .max(5000) .describe("The plain text content to send to the user."), });
  • src/index.ts:63-63 (registration)
    Instantiates the BroadcastTextMessage class with the messaging API client and calls its register method to add the tool to the MCP server.
    new BroadcastTextMessage(messagingApiClient).register(server);

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/tndfame/mcp_management'

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