Skip to main content
Glama
tndfame
by tndfame

push_text_message

Send plain text messages to LINE users through the LINE Bot MCP Server. This tool enables AI agents to deliver text content directly to specified user IDs 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.U1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p
messageYes

Implementation Reference

  • The core handler function that sends a text message to a LINE user using the messaging API client. It checks for userId, pushes the message, and handles errors with standardized responses.
    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}`,
        );
      }
    },
  • Input schema for the push_text_message tool, consisting of userId (string, default destinationId) and message (textMessageSchema).
    {
      userId: userIdSchema,
      message: textMessageSchema,
    },
  • Zod schema defining the structure of a LINE text message: type 'text' and text string up to 5000 chars.
    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."),
    });
  • The register method in PushTextMessage class that registers the tool on the MCP server, including name, description, schema, and handler.
    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_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}`,
            );
          }
        },
      );
    }
  • src/index.ts:61-61 (registration)
    Instantiation of PushTextMessage tool with LINE client and destination ID, and registration on the MCP server.
    new PushTextMessage(messagingApiClient, destinationId).register(server);
Behavior2/5

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

With no annotations provided, the description carries full burden. It mentions the action ('push') but lacks critical behavioral details: no information about authentication requirements, rate limits, error conditions, whether this is synchronous/asynchronous, or what happens on success/failure. The description is minimal and doesn't adequately disclose behavioral traits.

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 perfectly concise: two sentences that directly state the tool's purpose and usage guidance. Every word earns its place with zero waste or redundancy.

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 message-sending tool with no annotations and no output schema, the description is insufficient. It doesn't cover important contextual aspects like response format, error handling, authentication needs, or rate limits. The description is too minimal given the tool's complexity and lack of structured metadata.

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% (userId has description, message.text has description, but message.type lacks description). The description adds no parameter-specific information beyond what's in the schema. With partial schema coverage, the description doesn't compensate for gaps, resulting in a baseline score.

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 a simple text message') and resource ('to a user via LINE'), with the specific constraint 'without formatting'. It distinguishes from formatting-rich siblings like push_flex_message but doesn't explicitly differentiate from push_text_message (if it exists) or push_messages.

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

Usage Guidelines3/5

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

The description provides implied usage guidance: 'Use this for sending plain text messages without formatting.' This suggests when to use it (plain text) but doesn't explicitly state when not to use it or name alternatives like push_flex_message or push_messages from the sibling list.

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