Skip to main content
Glama
tndfame
by tndfame

broadcast_messages

Send text or flex messages to all LINE followers simultaneously. Use this tool to distribute announcements, updates, or notifications across your LINE channel.

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 executes the broadcast_messages tool logic: calls LINE broadcast API with messages, returns success or error response.
    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 input schema for the tool parameter 'messages': non-empty array of LINE messages (text or flex).
    const messages = z
      .array(lineMessageSchema)
      .min(1)
      .describe("Array of LINE messages (text/flex)");
  • Zod schema defining a LINE message as union of textMessageSchema or flexMessageSchema.
    const lineMessageSchema = z
      .union([textMessageSchema, flexMessageSchema])
      .or(z.any());
  • The register method of BroadcastMessages class that defines and registers the 'broadcast_messages' tool on the MCP server.
    register(server: McpServer) {
      const messages = z
        .array(lineMessageSchema)
        .min(1)
        .describe("Array of LINE messages (text/flex)");
    
      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}`,
            );
          }
        },
      );
    }
  • src/index.ts:75-75 (registration)
    Top-level instantiation and registration of the BroadcastMessages tool on the main MCP server instance.
    new BroadcastMessages(messagingApiClient).register(server);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'broadcast' implies a write operation that sends messages, it doesn't mention important behavioral aspects like rate limits, authentication requirements, whether this is a one-way broadcast (no replies), potential costs, or what happens on failure. The description is too minimal for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that efficiently communicates the core functionality. Every word earns its place with no wasted verbiage. It's front-loaded with the essential information about what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens after broadcasting (success indicators, error conditions), doesn't address the sibling tool relationships, and provides minimal behavioral context. The agent would need to guess about important operational aspects of this broadcast functionality.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents the 'messages' parameter thoroughly with its text and flex message structures. The description adds minimal value by mentioning 'one or more LINE messages' and 'text/flex' types, but doesn't provide additional semantic context beyond what's in the schema. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('broadcast'), the resource ('LINE messages'), and the target ('all followers'), which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'broadcast_flex_message' or 'broadcast_text_message', which appear to be more specialized versions of this generic tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'broadcast_flex_message' or 'broadcast_text_message'. It mentions 'generic' but doesn't explain what makes it generic or when to choose it over the more specific siblings. No prerequisites, exclusions, or comparison context is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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