Skip to main content
Glama
wasintoh

line-oa-mcp-ultimate

by wasintoh

Send LINE Message (universal)

line_send_message

Send any LINE message to one or multiple users, an audience, or everyone. Automatically selects reply, push, multicast, narrowcast, or broadcast based on target shape.

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

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 }
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?

Annotations indicate non-read-only, non-destructive, non-idempotent, open-world. The description adds extensive context: auto API selection, pre-flight validation, Quota Guardian, quiet-hours check, retry key, and mode-specific behaviors. This goes well beyond annotations.

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 well-structured with clear headings for modes, targets, messages, safety, returns, examples, and errors. The core purpose is front-loaded. While lengthy, every section adds necessary value without redundancy.

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 complexity (six target shapes, four message shapes, three modes, safety mechanisms), the description is complete. It explains return values for each mode, common errors, and provides examples. Lacking output schema is compensated by detailed return descriptions.

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?

Schema coverage is 100% with descriptions, but the tool description adds significant meaning: explains target shapes in detail, message shapes with examples, mode differences, and special behaviors (confirm, force). This provides context beyond schema.

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 states 'Send any LINE message to any target' with a specific verb and resource. It clearly distinguishes from sibling tools which are about audience management, rich menus, etc., and the title includes 'universal' to emphasize broad applicability.

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 explicitly explains when to use each mode (send_now, draft, dry_run), provides guidance on target shapes (reply, push, multicast, narrowcast, broadcast), and mentions use cases like scheduling via LINE OA Manager UI. It includes examples and error scenarios.

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