Skip to main content
Glama
acquo

LINE Bot MCP Server (SSE Support)

by acquo

push_flex_message

Send customizable flex messages via LINE with bubble or carousel layouts to deliver rich, interactive content to users.

Instructions

Push a highly customizable flex message to a user via LINE. Supports both bubble (single container) and carousel (multiple swipeable bubbles) layouts.

Input Schema

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

Implementation Reference

  • The handler implementation for the "push_flex_message" tool, which uses the LINE MessagingApiClient to send a Flex message.
    server.tool(
      "push_flex_message",
      "Push a highly customizable flex message to a user via LINE. Supports both bubble (single container) and carousel " +
        "(multiple swipeable bubbles) layouts.",
      {
        userId: userIdSchema,
        message: flexMessageSchema,
      },
      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 flex message: ${error.message}`,
          );
        }
      },
    );
  • Registration logic for the "push_flex_message" tool within the MCP server.
    register(server: McpServer) {
      const userIdSchema = z
        .string()
        .default(this.destinationId)
        .describe(
          "The user ID to receive a message. Defaults to DESTINATION_USER_ID.",
        );
    
      server.tool(
        "push_flex_message",
        "Push a highly customizable flex message to a user via LINE. Supports both bubble (single container) and carousel " +
          "(multiple swipeable bubbles) layouts.",
        {
          userId: userIdSchema,
          message: flexMessageSchema,
        },
        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 flex message: ${error.message}`,
            );
          }
        },
      );
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the message is 'highly customizable' and supports specific layouts, but doesn't cover critical aspects like authentication requirements, rate limits, error conditions, whether the operation is idempotent, or what happens on success/failure. For a messaging tool with zero annotation coverage, this is insufficient.

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?

Two sentences with zero waste. The first sentence states the core purpose, and the second adds essential detail about layout options. Every word earns its place, and the structure is front-loaded with the main action.

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 messaging tool with no annotations, no output schema, and incomplete parameter documentation (50% schema coverage), the description is inadequate. It doesn't explain what happens after pushing (e.g., success response, error handling), doesn't mention authentication or rate limits, and leaves key parameters like 'userId' under-explained. The description fails to provide the necessary context for safe and effective use.

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?

Schema description coverage is 50% (only 'altText' and container 'type' have descriptions). The description adds some value by explaining bubble vs. carousel layouts, which clarifies the 'contents.type' enum. However, it doesn't explain the 'userId' parameter (beyond what the schema's default value implies) or provide additional context about the flexible container structure beyond what's in the schema. The description partially compensates but doesn't fully address the coverage gap.

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 ('push'), the resource ('flex message'), and the target ('to a user via LINE'). It distinguishes from sibling tools like 'push_text_message' by specifying 'flex message' and mentioning bubble/carousel layouts. However, it doesn't explicitly differentiate from 'broadcast_flex_message' (which likely sends to multiple users).

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?

No guidance on when to use this tool versus alternatives. The description mentions bubble vs. carousel layouts but doesn't provide context for choosing between this tool and siblings like 'broadcast_flex_message' (for multiple users) or 'push_text_message' (for simpler text). No prerequisites or exclusions are stated.

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

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