Skip to main content
Glama
tndfame
by tndfame

push_messages

Send text or flexible messages to LINE users through the LINE Bot MCP Server, enabling communication via the LINE Messaging API.

Instructions

Push one or more LINE messages to a user (generic).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdNoUser ID to receive messages. Defaults to DESTINATION_USER_IDU1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p
messagesYesArray of LINE messages (text/flex)

Implementation Reference

  • The async handler function that executes the 'push_messages' tool logic, validating userId and pushing messages to LINE via the messaging API client, handling errors appropriately.
    async ({ userId, messages }) => {
      if (!userId) return createErrorResponse(NO_USER_ID_ERROR);
      try {
        const resp = await this.client.pushMessage({
          to: userId,
          messages: messages as unknown as messagingApi.Message[],
        });
        return createSuccessResponse(resp);
      } catch (e: any) {
        return createErrorResponse(
          `Failed to push messages: ${e?.message || e}`,
        );
      }
    },
  • Zod input schema definitions for the tool parameters: userId (optional string defaulting to destinationId) and messages (non-empty array of lineMessageSchema).
    register(server: McpServer) {
      const userId = z
        .string()
        .default(this.destinationId)
        .describe("User ID to receive messages. Defaults to DESTINATION_USER_ID");
      const messages = z
        .array(lineMessageSchema)
        .min(1)
        .describe("Array of LINE messages (text/flex)");
  • Zod schema union for LINE message types, accepting textMessageSchema, flexMessageSchema, or any.
    const lineMessageSchema = z
      .union([textMessageSchema, flexMessageSchema])
      .or(z.any());
  • src/index.ts:74-74 (registration)
    Main application registration: creates a new PushMessages instance with the LINE messaging API client and destination user ID, then calls register on the MCP server.
    new PushMessages(messagingApiClient, destinationId).register(server);
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'push' messages but doesn't disclose behavioral traits like whether this requires specific permissions, rate limits, error handling, or what happens on success/failure. For a messaging tool with zero annotation coverage, this is a significant gap.

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 a single, efficient sentence that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded, with zero wasted content.

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?

Given the complexity of a messaging tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'push' entails operationally, return values, error conditions, or how it differs from sibling tools, leaving critical gaps for an AI agent.

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 100%, so the schema already documents both parameters thoroughly. The description adds no additional meaning about parameters beyond what's in the schema, such as explaining the 'generic' aspect or providing examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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') and resource ('LINE messages to a user'), making the purpose understandable. However, it doesn't differentiate this 'generic' tool from its more specific siblings like push_text_message or push_flex_message, which would require a 5.

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. With siblings like push_text_message and push_flex_message available, there's no indication whether this tool is preferred for mixed message types or other scenarios, leaving usage unclear.

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