line-oa-mcp-ultimate
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LINE_CHANNEL_ACCESS_TOKEN | Yes | The channel access token for your LINE Messaging API channel. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| line_send_messageA | Send any LINE message to any target. Picks the right LINE API automatically (reply / push / multicast / narrowcast / broadcast) based on the shape of Three modes (parameter
Target shapes (pick one):
Message shapes (pick one):
Auto-applied safety:
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:
Errors:
|
| line_show_typingA | Display the "..." typing indicator in a 1:1 chat with a user. The indicator vanishes when the bot sends a message OR after the timeout. Use this when an agent is about to take a noticeable amount of time before replying. Only works in 1:1 chats (NOT in groups or multi-person rooms). Args:
Returns: { success: true, chat_id, seconds } |
| line_find_stickerA | Find LINE stickers from a curated catalog by mood or keyword. Both Thai and English search terms are supported. LINE only allows bots to send stickers from a limited official list. This tool lets agents pick stickers by intent ("celebration", "ขอบคุณ", "sorry") rather than guessing IDs. Args:
Returns: { query, count, stickers: [{ package_id, sticker_id, moods, keywords_th, keywords_en, description }] } Pass the chosen package_id + sticker_id to line_send_message: { message: { sticker: { package_id, sticker_id } } } Examples:
|
| line_build_rich_menuA | Create a LINE Rich Menu in one call: validate → create → upload image → set as default. Collapses what is normally 4 LINE API calls into one tool, including the api-data.line.me domain switch for image upload (the #1 cause of failed implementations). This V1 supports single-panel rich menus. The "tab-pair" (Tab A ↔ Tab B switching design) shipped widely by Thai agencies will be added in V1.1 alongside richmenu alias support. Args:
Returns: { rich_menu_id: string, name: string, set_as_default: boolean, warnings: string[] } Image requirements (validated client-side before upload):
Examples:
Errors:
|
| line_list_rich_menusA | List all rich menus on an OA + identify which one is the account-wide default. OAs can hold up to 1,000 rich menus — use line_delete_rich_menu to clean up. Args:
Returns: { total: number, default_id?: string, rich_menus: [{ rich_menu_id, name, chat_bar_text?, size?, is_default, is_selected }] } Use this before line_build_rich_menu to avoid hitting the 1,000-menu cap. |
| line_delete_rich_menuA | Delete a rich menu by ID. If the menu is currently linked to specific users, those links break silently — consider running line_audit_user_menu first. Requires confirm=true to prevent accidental deletion via prompt drift. Args:
Returns: { success: true, deleted_id } |
| line_audit_user_menuA | Why is user X seeing menu Y? This tool inspects the rich-menu priority chain for a user:
Args:
Returns: { user_id, visible_rich_menu_id?: string, source: 'per_user' | 'default' | 'none', per_user_link?: string, default_id?: string, explanation: string // Thai-language explanation } |
| line_design_flexA | Compose a validated Flex Message ready for line_send_message. Two input modes:
Returns: { template?: string, flex_json: { ...Flex contents... }, alt_text: string, preview_url: string, // LINE Flex Simulator deep link size_bytes: number, warnings: string[] // e.g., if approaching the 30KB bubble limit } Composability:
Examples:
|
| line_build_audience_from_csvA | Create a new LINE audience by uploading user IDs (or IFAs). After creation LINE indexes the audience for ~5-10 minutes — line_list_audiences will report status=IN_PROGRESS during that window, then READY. This is the "CSV from Google Sheets → retargeting audience" flow most Thai SMBs need. Args:
Returns: { audience_group_id, name, type, created_unix_ms } Region note: Audience Management API is gated to JP / TW / TH OAs (+ premium). Examples:
|
| line_build_audience_from_engagementA | Create a LINE audience from people who clicked or opened a previous broadcast / narrowcast. The killer "retarget without a CRM" tool. Args:
Returns: { audience_group_id, name, type } Notes:
Example workflow:
|
| line_list_audiencesA | List audience groups on the OA. Audiences created via LINE OA Manager UI (e.g. chat-tag audiences, friend-path audiences, web-traffic audiences) also appear here — even though those types cannot be CREATED via Messaging API. Status meanings:
Args:
Returns: { total: number, count: number, page: number, audiences: [{ audience_group_id, name, status, audience_count?, created, type? }], has_more: boolean } Examples:
|
| line_delete_audienceA | Delete an audience group. Irreversible — requires confirm=true. Args:
Returns: { success: true, deleted_id } |
| line_get_oa_reportA | Generate a digest of LINE OA performance over a date range. Bundles 8+ Insight API calls into a single Thai-friendly markdown report. Args:
Returns (structured): { oa_id, range: { from, to, preset? }, delivery: { total, daily: [{ date, broadcast, multicast, push, reply, total }] }, followers: { latest_count?, follow?, unfollow?, net_gain? }, demographic_available: boolean, quota: { used, total, percentage_used }, notes: string[] // T-2 data lag note, privacy-floor note, etc. } Notes:
Examples:
|
| line_get_message_statsA | Fetch per-broadcast engagement stats for a specific request_id: impressions, opens, clicks, CTR, and per-URL click breakdown. Args:
Returns (structured): { request_id, delivered?: number, unique_impression?: number, // null if below ~20-user privacy floor unique_click?: number, ctr_percent?: number, per_url_clicks: [{ url, click, unique_click }], notes: string[] // T-1 lag note, privacy-floor note } Important caveats (surfaced in notes):
|
| line_get_oa_statusA | Quick health check of a LINE Official Account: friend count, monthly quota usage, webhook status, and current default rich menu. Aggregates 4 LINE API calls into one card. Use this as the first call of a session — every other tool decision (whether to send, schedule, switch OA, etc.) benefits from knowing current quota and webhook state. Args:
Returns: Structured object: { oa: { id, display_name, picture_url? }, friends?: number, // omitted if not retrievable quota: { used, total, remaining, percentage_used }, webhook: { active, url? }, default_rich_menu?: { id, name? }, region?: string, health: 'OK' | 'WARNING' | 'ERROR', warnings: string[] } Examples:
|
| line_estimate_send_costA | Estimate how many quota messages a planned send will consume — without actually sending. Useful before user confirmation, especially for narrowcast / broadcast. Args:
Returns: { estimated_recipients?: number, // known exactly for user_id(s); approximate for audience; unknown for filter/everyone estimated_cost_messages?: number, // recipients * message_count quota: { used, total, remaining, percentage_used }, cost_share_percent?: number, // estimated_cost / remaining notes: string[] } Notes:
|
| line_test_webhookA | Ping the OA's webhook URL from LINE servers and report HTTP status + latency. LINE checks that the endpoint returns 200 within their timeout AND that signature verification works (when secret is configured). Args:
Returns: { success: boolean, status_code: number, latency_ms?: number, reason: string, // LINE's human-readable result detail?: string, configured_endpoint?: string, tested_endpoint: string } Common failure modes (LINE returns them via 'reason'):
Use this whenever a bot stops responding before debugging anything else. |
| line_manage_liff_appA | LIFF lifecycle CRUD. Four modes:
Args:
Auth note: LIFF Server API uses LINE Login channel tokens — V1 uses the same Messaging API token for simplicity. For separate-channel setups, see docs. Examples:
|
| line_emit_liff_codeA | Generate a working LIFF SDK init code snippet for the requested framework and features. The output is paste-ready and includes feature-detection guards (e.g., scanCodeV2 only on LINE 14+, iOS 14.3+). Args:
Returns: { framework, features, language: 'ts' | 'js', code: string, // copy-paste ready install_command: string, notes: string[] } |
| line_emit_login_snippetA | Generate a working LINE Login OAuth 2.1 flow scaffold (authorize URL + token exchange + verify + userinfo + optional refresh + optional friendship check) for your backend framework. This replaces 10 separate OAuth tool calls with one paste-ready code block — Claude Code's superpower. Args:
Returns: { framework, scopes, code: string, env_vars_required: string[], notes: string[] } The emitted code uses placeholders:
|
| line_get_user_profileA | Fetch a LINE user's profile (display name, picture, status message, language) by user ID. Note: Only works if the user has added the bot as a friend AND has not blocked it AND has consented to share profile (per LINE TOS). Returns 404 ambiguously if any of these conditions fail — we surface a clear Thai-language explanation. Args:
Returns: { user_id, display_name, picture_url?, status_message?, language? } |
| line_list_followersA | Page through every user that has added the OA as a friend. ⚠️ Region-gated: only TH / JP / TW OAs with premium tier can use this endpoint. Other OAs will get LINE 403. Args:
Returns: { user_ids: string[], count: number, has_more: boolean, next_continuation_token?: string } For very large OAs (50k+), prefer creating an engagement audience via line_build_audience_from_engagement rather than pulling all IDs. |
| line_list_oasA | List all LINE Official Accounts available to this MCP instance, from the multi-OA config file (or single-OA env mode). Useful before line_use_oa to discover the OA IDs. Args:
Returns: { active_oa: string, oas: [{ id, display_name?, region?, is_premium?, is_active }] } |
| line_use_oaA | Switch which OA all subsequent tool calls default to (until changed or process restarts). In-memory only — does not edit ~/.line-mcp/config.json. Args:
Returns: { active_oa, display_name } |
| line_run_on_many_oasA | Agency feature — run any read-only line_* tool across many OAs in parallel. Errors on individual OAs are isolated (one bad token doesn't break the whole run). Supported tools (read-only only for V1 safety):
Args:
Returns: { tool, count_ok, count_failed, results: [{ oa_id, oa_name, success, summary }], errors: [{ oa_id, error }] } Examples:
|
| line_manage_couponA | Coupon CRUD on a LINE OA. Four modes:
Rate limit: shared bucket 200 req/sec with multicast. Args (varies by mode):
Examples:
|
| line_get_coupon_statsA | Read available stats for a LINE coupon. We combine multiple signals because LINE's Coupon API does not (yet) expose a dedicated redemption-events endpoint:
Args:
Returns (structured): { coupon_id, raw: {...whatever LINE returned about the coupon...}, click_audience?: { id, name, audience_count, status }, estimated_redemptions?: number, notes: string[] // explains data sources clearly } Notes:
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| daily-oa-report | Generate a Thai-language summary of today's / last week's LINE OA performance. |
| build-campaign | Wizard for designing a broadcast: audience → Flex → schedule via OA Manager. |
| schedule-broadcast-howto | Explain 3 patterns to schedule a LINE broadcast: OA Manager UI, Cowork Scheduled Tasks, system cron. |
| diagnose-rich-menu | "ทำไม user ไม่เห็นเมนู?" troubleshooter |
| coupon-campaign | Create coupon → broadcast → audience from clicks → measure |
| migrate-from-line-notify | Help user migrate LINE Notify (dead 2025-03-31) to Messaging API push. |
| webhook-setup-guide | Walk through setting up a LINE webhook handler — signature verification, ngrok/cloudflared, common pitfalls. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| flex-templates | Thai-localized Flex Message templates with required fields. |
| stickers-catalog | Bundled curated catalog of bot-safe LINE stickers with mood/keyword tags. |
| thai-holidays | Thai public, royal, Buddhist, and cultural holidays with marketing promo patterns. |
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