Skip to main content
Glama

broadcast_messages

Send text or flex messages to all LINE followers simultaneously. Use this tool to distribute announcements, updates, or content to your entire audience at once.

Instructions

Broadcast one or more LINE messages to all followers (generic).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messagesYesArray of LINE messages (text/flex)

Implementation Reference

  • The handler function that takes an array of messages and broadcasts them to all LINE followers using the client's broadcast method, handling success and error responses.
    async ({ messages }) => { try { const resp = await this.client.broadcast({ messages: messages as unknown as messagingApi.Message[], }); return createSuccessResponse(resp); } catch (e: any) { return createErrorResponse( `Failed to broadcast messages: ${e?.message || e}`, ); } }, );
  • Zod schema for the 'messages' parameter: non-empty array of lineMessageSchema (text or flex messages).
    const messages = z .array(lineMessageSchema) .min(1) .describe("Array of LINE messages (text/flex)");
  • Union schema for LINE messages: textMessageSchema, flexMessageSchema, or any.
    const lineMessageSchema = z .union([textMessageSchema, flexMessageSchema]) .or(z.any());
  • src/index.ts:75-75 (registration)
    Instantiates the BroadcastMessages tool with the messaging API client and registers it on the MCP server.
    new BroadcastMessages(messagingApiClient).register(server);
  • Registers the 'broadcast_messages' tool on the MCP server with schema, description, and handler.
    server.tool( "broadcast_messages", "Broadcast one or more LINE messages to all followers (generic).", { messages }, async ({ messages }) => { try { const resp = await this.client.broadcast({ messages: messages as unknown as messagingApi.Message[], }); return createSuccessResponse(resp); } catch (e: any) { return createErrorResponse( `Failed to broadcast messages: ${e?.message || e}`, ); } }, );

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