Skip to main content
Glama
wasintoh

line-oa-mcp-ultimate

by wasintoh

Send LINE Message (universal)

line_send_message

Send LINE messages to individuals, groups, or broadcasts with automatic API selection, pre-flight validation, quota monitoring, and quiet-hours protection.

Instructions

Send any LINE message to any target. Picks the right LINE API automatically (reply / push / multicast / narrowcast / broadcast) based on the shape of target.

Three modes (parameter mode):

  • send_now (default): Send immediately. Pre-flight validation + Quota Guardian + quiet-hours check are applied.

  • draft: DO NOT SEND. Return a "handoff package" with audience id, Flex JSON, a LINE OA Manager broadcast URL, and 6 click-through steps. Use this when the user wants to SCHEDULE — LINE OA Manager UI has native scheduling that Messaging API lacks.

  • dry_run: Validate + estimate cost only. Useful before confirm flows.

Target shapes (pick one):

  • { reply_to: "webhookEventId" } — reply (1 user, free, 30s window)

  • { user_id: "U..." } — push to one

  • { user_ids: ["U...", "U..."] } — multicast (auto-chunked to 500/call)

  • { audience: "name-or-id" } — narrowcast by audience group

  • { filter: { ages, genders, areas, ... } } — narrowcast by demographic

  • { everyone: true } — broadcast (requires confirm: true)

Message shapes (pick one):

  • { text: "..." } — plain text (≤5000 chars)

  • { template: "voucher", data: {...} } — pre-built Thai-localized Flex template

  • { flex_json: {...}, alt_text: "..." } — raw Flex JSON (advanced)

  • { sticker: { package_id, sticker_id } } — LINE sticker

  • { coupon_id: "01..." , delivery_tag? } — native LINE coupon (from line_manage_coupon)

Auto-applied safety:

  • Pre-flight validation via LINE /validate (catches JSON errors before consuming quota)

  • Quota Guardian: blocks if projected cost > 95% of remaining quota unless confirm=true

  • Quiet-hours warning (22:00–08:00 BKK) unless force=true

  • Reply-token TTL handling: falls back to push if token is expired (with a warning)

  • Auto-generated X-Line-Retry-Key for safe retries

Returns (varies by mode): send_now → { success, transport, request_id?, recipient_count_estimated, quota, warnings[], next_steps? } draft → { draft: true, oa_manager_url, audience_summary, flex_json_pretty, flex_preview_url, copy_paste_steps[], notes } dry_run → { dry_run: true, transport, validated, projected_recipients, projected_cost_messages, quota, warnings[] }

Examples:

  • "ส่งข้อความให้คุณ A" → { target: { user_id: "U..." }, message: { text: "..." } }

  • "ออกแบบโปรวันแม่ + เตรียม schedule" → { target: { audience: "moms" }, message: { template: "promo_simple", data: {...} }, mode: "draft" }

  • "ส่งโปรให้ผู้หญิง 25-44 กรุงเทพ" → { target: { filter: { genders: ["female"], ages: ["age_25", "age_30"], areas: ["bangkok"] } }, message: {...} }

Errors:

  • QUOTA_OVER → Reduce audience or wait for monthly reset

  • QUIET_HOURS → Pass force=true or use mode=draft to schedule

  • INVALID_MESSAGE → Pre-validation caught a JSON error; check details

  • AUDIENCE_NOT_READY → Wait ~10 minutes after audience creation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesWho to send to. Pick one shape: { reply_to } | { user_id } | { user_ids[] } | { audience } | { filter } | { everyone: true }
messageYesWhat to send. Pick one shape: { text } | { template, data } | { flex_json, alt_text } | { sticker } | { coupon_id }
modeNosend_now (default) sends immediately; draft returns a handoff package for LINE OA Manager UI; dry_run validates + estimates without sending.send_now
oaNoOA id (multi-OA). Omit to use active OA.
confirmNoRequired to be true when projected cost > 95% of remaining quota, or when target.everyone === true.
forceNoOverride quiet-hours warning (22:00–08:00 BKK). Defaults false; LINE Thai customers prefer not to be pinged at night.
quiet_pushNoSuppress push notification on recipient device (silent send). Default false.
Behavior5/5

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

The description discloses behavioral traits not covered by annotations, such as pre-flight validation, Quota Guardian, quiet-hours check, reply-token TTL handling, and auto-generated retry key. It also details return values per mode. There is no contradiction with annotations.

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

Conciseness4/5

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

The description is well-structured with sections, bullet points, and examples. While comprehensive, it is somewhat lengthy but every sentence adds value. A slight reduction might improve conciseness without losing clarity.

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

Completeness5/5

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

Given the tool's complexity (many target/message shapes, modes, safety features, no output schema), the description is thorough. It covers all modes, return values, error types, and provides practical examples, making it complete for an AI agent to use.

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

Parameters5/5

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

With 100% schema description coverage, the description adds significant meaning beyond the schema for parameters like target and message by explaining the high-level shapes and providing examples. It also clarifies the mode parameter's options and safety parameters like confirm and force.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Send any LINE message to any target' with automatic API selection. It distinguishes itself from sibling tools by focusing on message sending, while siblings cover other LINE operations like audience management, rich menus, etc.

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

Usage Guidelines5/5

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

The description provides extensive usage guidelines, including three modes (send_now, draft, dry_run), target shapes, message shapes, safety features, and error handling. It implicitly tells when to use each mode (e.g., draft for scheduling) and contrasts with alternatives like line_estimate_send_cost.

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/wasintoh/line-oa-mcp-ultimate'

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