mcp-server
v0.24.0MCP server for L Harness — operate a LINE official account from AI agents over MCP
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
send_message
Send a text, image, or flex message to a specific friend. Use messageType 'image' for standalone image messages, 'flex' for rich card layouts.
| Parameter | Type | Description |
|---|---|---|
content * | string | Message content. For text: plain string. For image: JSON string with originalContentUrl and previewImageUrl (both HTTPS URLs). For flex: JSON string of LINE Flex Message. |
friendId * | string | The friend's ID to send the message to |
altText | string | Custom notification preview text for Flex Messages (shown on lock screen). If omitted, auto-extracted from Flex content. |
isTest | boolean | Mark as test send. Prepends 【テスト配信】 to text messages, adds test banner to flex messages. |
messageType | string | Message type: 'text' for plain text, 'image' for standalone image, 'flex' for Flex Message JSON |
trackLinks | boolean | Set false to disable automatic URL shortening (/t/ tracking links). URLs are sent as-is. Default true. |
broadcast
Send a broadcast message to all friends, a specific tag group, or a filtered segment. Creates and immediately sends the broadcast.
| Parameter | Type | Description |
|---|---|---|
messageContent * | string | Message content. For text: plain string. For flex: JSON string. |
messageType * | string | Message type |
title * | string | Internal title for this broadcast (not shown to users) |
accountId | string | LINE account ID (uses default if omitted) |
altText | string | Custom notification preview text for Flex Messages (shown on lock screen). If omitted, auto-extracted from Flex content. |
scheduledAt | string | ISO 8601 datetime to schedule. Omit to send immediately. |
segmentConditions | string | JSON string of segment conditions when targetType is 'segment'. Format: { operator: 'AND'|'OR', rules: [{ type: 'tag_exists'|'tag_not_exists'|'metadata_equals'|'metadata_not_equals'|'ref_code'|'is_fol… |
targetTagId | string | Tag ID when targetType is 'tag' |
targetType | string | Target audience: 'all' for everyone, 'tag' for a tag group, 'segment' for filtered conditions |
trackLinks | boolean | Set false to disable automatic URL shortening (/t/ tracking links). URLs are sent as-is. Default true. |
create_scenario
Create a step delivery scenario with multiple message steps. Each step has a delay and message content. Scenarios auto-trigger on friend_add, tag_added, or manual enrollment.
| Parameter | Type | Description |
|---|---|---|
name * | string | Scenario name |
steps * | array | Ordered list of message steps |
triggerType * | string | When to start: 'friend_add' on new friends, 'tag_added' when a tag is applied, 'manual' for explicit enrollment |
accountId | string | LINE account ID (uses default if omitted) |
triggerTagId | string | Required when triggerType is 'tag_added': the tag ID that triggers this scenario |
enroll_in_scenario
Enroll a friend into a scenario. The friend will start receiving the scenario's step messages from step 1.
| Parameter | Type | Description |
|---|---|---|
friendId * | string | The friend's ID to enroll |
scenarioId * | string | The scenario ID to enroll the friend in |
manage_tags
List, create, or delete tags, and add/remove tags to/from friends. Supports batch operations on multiple friends.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
friendIds | array | Friend IDs to add/remove the tag from (for 'add' or 'remove' actions) |
tagColor | string | Tag color hex code (for 'create' action, e.g. '#FF0000') |
tagId | string | Tag ID (for 'add' or 'remove' actions) |
tagName | string | Tag name (for 'create' action) |
create_form
Create a form for collecting user responses. Can auto-tag responders and enroll them in scenarios.
| Parameter | Type | Description |
|---|---|---|
fields * | string | JSON string of form fields. Format: [{ name: string, label: string, type: 'text'|'email'|'tel'|'number'|'textarea'|'select'|'radio'|'checkbox'|'date', required?: boolean, options?: string[], placehold… |
name * | string | Form name |
accountId | string | LINE account ID (uses default if omitted) |
description | string | Form description shown to users |
ogDescription | string | null | OGP description override for the form's LIFF page preview |
ogImageUrl | string | null | OGP image URL override for the form's LIFF page preview |
ogTitle | string | null | OGP title override for the form's LIFF page preview |
onSubmitMessageContent | string | Custom message content to send after submission. If set, replaces the default confirmation Flex. |
onSubmitMessageType | string | Custom message type to send after submission. Supports template variables: {{name}}, {{auth_url:CHANNEL_ID}} |
onSubmitScenarioId | string | Scenario ID to auto-enroll when form is submitted |
onSubmitTagId | string | Tag ID to auto-apply when form is submitted |
saveToMetadata | boolean | Save form responses to friend metadata |
create_tracked_link
Create a click-tracking link. When clicked, can auto-tag the user, enroll them in a scenario, or send a custom intro message via push.
| Parameter | Type | Description |
|---|---|---|
name * | string | Link name (internal label) |
originalUrl * | string | The destination URL to redirect to |
accountId | string | LINE account ID that owns this link. LINE in-app clicks on /t/ redirect to this account's LIFF for user identification — set it so friends of that account never see another account's consent screen. |
introTemplateId | string | Message template ID to push as the campaign intro message right after friend-add. Use {formUrl} as a placeholder inside the template body to substitute the LIFF form URL at send time. |
ogDescription | string | null | OGP description override for the tracking link preview |
ogImageUrl | string | null | OGP image URL override for the tracking link preview |
ogTitle | string | null | OGP title override for the tracking link preview (overrides the destination page's og:title) |
rewardTemplateId | string | Message template ID to push as the reward message after form submission verification passes. Overrides the form's built-in on_submit_message. Use this when reusing one form across multiple campaigns w… |
scenarioId | string | Scenario ID to auto-enroll on click |
tagId | string | Tag ID to auto-apply on click |
list_friends
List friends with optional filtering by tag, name search, or metadata values. Returns paginated results with friend details.
| Parameter | Type | Description |
|---|---|---|
accountId | string | LINE account ID (uses default if omitted) |
limit | number | Number of friends to return (max 100) |
metadataFilter | string | JSON string of metadata filters. e.g. '{"monthly_cost": "〜100万円", "business_type": "EC・物販"}' |
offset | number | Offset for pagination |
search | string | Search friends by display name (partial match) |
tagId | string | Filter by tag ID |
get_friend_detail
Get detailed information about a specific friend including tags, metadata, profile, and message history.
| Parameter | Type | Description |
|---|---|---|
friendId * | string | The friend's ID |
includeMessages | boolean | Include message history (default: false) |
get_form_submissions
Get all submissions for a specific form. Returns response data with timestamps and friend IDs.
| Parameter | Type | Description |
|---|---|---|
formId * | string | The form ID to get submissions for |
get_link_clicks
Get click analytics for a tracked link including total clicks and per-friend click history.
| Parameter | Type | Description |
|---|---|---|
linkId * | string | The tracked link ID |
account_summary
Get a high-level summary of the LINE account: friend count per account (DB + LINE API stats), active scenarios, recent broadcasts, tags, and forms. Use this to understand the current state before making changes.
| Parameter | Type | Description |
|---|---|---|
accountId | string | LINE account ID (uses default if omitted) |
list_crm_objects
List all CRM objects of a specific type: scenarios, forms, tags, rich menus, tracked links, or broadcasts.
| Parameter | Type | Description |
|---|---|---|
objectType * | string | Type of CRM object to list |
accountId | string | LINE account ID (uses default if omitted) |
manage_ad_platforms
Manage ad platform integrations for conversion tracking. Supports Meta (Facebook/Instagram), X (Twitter), Google Ads, and TikTok. Use 'list' to see configured platforms, 'create' to add a new one, 'update' to modify settings, 'delete' to remove, or 'test' to verify the connection.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
config | object | Platform config JSON. Meta: {pixel_id, access_token, test_event_code?}. X: {pixel_id, api_key, api_secret}. Google: {customer_id, conversion_action_id, oauth_token}. TikTok: {pixel_code, access_token} |
displayName | string | Display name for the platform (e.g. 'Meta広告') |
eventName | string | Event name for test conversion (for 'test', e.g. 'Lead') |
friendId | string | Friend ID for test conversion (for 'test') |
isActive | boolean | Enable/disable the platform (for 'update') |
name | string | Platform name (required for 'create' and 'test') |
platformId | string | Platform ID (required for 'update' and 'delete') |
get_conversion_logs
View ad conversion send logs for a specific platform. Shows the history of conversion events sent to Meta CAPI, X, Google Ads, or TikTok, including status (sent/failed) and error details.
| Parameter | Type | Description |
|---|---|---|
platformId * | string | Ad platform ID to get logs for. Use manage_ad_platforms with action 'list' first to get the ID. |
limit | number | Maximum number of logs to return (default: 50) |
manage_staff
スタッフアカウントの追加・一覧・更新・削除・APIキー再生成。オーナー権限が必要です。
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
email | string | null | Staff email (optional, null to clear) |
isActive | boolean | Activate/deactivate (for 'update') |
name | string | Staff name (for 'create' action) |
role | string | Staff role (for 'create'/'update') |
staffId | string | Staff ID (for 'get','update','delete','regenerate_key') |
upload_image
Upload an image to get a public URL for use in LINE messages (Flex Message hero images, image messages, etc.). Accepts base64-encoded image data. Returns public URL.
| Parameter | Type | Description |
|---|---|---|
data * | string | Base64-encoded image data (with or without data:image/...;base64, prefix) |
filename | string | Optional original filename for reference |
mimeType | string | Image MIME type |
manage_friends
友だちの管理操作。count: 友だち数取得、set_metadata: メタデータ更新、set_rich_menu: リッチメニュー割当、remove_rich_menu: リッチメニュー解除。
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
friendId | string | Friend ID (required for set_metadata, set_rich_menu, remove_rich_menu) |
metadata | string | JSON string of metadata fields to set (for 'set_metadata') |
richMenuId | string | Rich menu ID to assign (for 'set_rich_menu') |
manage_scenarios
シナリオの管理操作。list: 一覧、get: 詳細(ステップ含む)、update: 更新、delete: 削除、add_step: ステップ追加、update_step: ステップ更新、delete_step: ステップ削除。
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
accountId | string | LINE account ID for list (uses default if omitted) |
conditionType | Condition type evaluated at delivery time. tag_exists / tag_not_exists: conditionValue = tag UUID. metadata_equals / metadata_not_equals: conditionValue = JSON {"key":"...","value":...}. Unknown value… | |
conditionValue | string | null | Condition value (for add_step, update_step). See conditionType for format. |
delayMinutes | number | Delay in minutes (for add_step, update_step) |
description | string | null | Scenario description (for update) |
isActive | boolean | Active status (for update) |
messageContent | string | Message content (for add_step, update_step) |
messageType | string | Message type (for add_step, update_step) |
name | string | Scenario name (for update) |
nextStepOnFalse | number | null | Next step on false (for add_step, update_step) |
onReachTagId | string | null | Tag ID to attach on step reach (for add_step, update_step; null clears) |
scenarioId | string | Scenario ID (required for get, update, delete, add_step, update_step, delete_step) |
stepId | string | Step ID (required for update_step, delete_step) |
stepOrder | number | Step order number (for add_step, update_step) |
templateId | string | null | Template ID reference (for add_step, update_step; null clears) |
triggerTagId | string | null | Trigger tag ID (for update) |
triggerType | string | Trigger type (for update) |
manage_broadcasts
配信の管理操作。list: 一覧、get: 詳細、create_draft: 下書き作成(送信しない)、update: 更新、send: 送信、send_to_segment: セグメント配信。
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
accountId | string | LINE account ID (uses default if omitted) |
broadcastId | string | Broadcast ID (required for get, update, send, send_to_segment) |
messageContent | string | Message content (for create_draft, update) |
messageType | string | Message type (for create_draft, update) |
scheduledAt | string | null | ISO 8601 datetime to schedule (for create_draft, update) |
segmentConditions | string | JSON string of segment conditions: {operator: 'AND'|'OR', rules: [{type, value}]} (for send_to_segment) |
targetTagId | string | null | Target tag ID (for create_draft, update) |
targetType | string | Target type (for create_draft, update) |
title | string | Broadcast title (for create_draft, update) |
manage_forms
フォームの管理操作。list: 一覧、get: 詳細、update: 更新、delete: 削除。作成は create_form ツールを使用。
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
description | string | null | Form description (for update) |
fields | string | JSON string of form fields array (for update) |
formId | string | Form ID (required for get, update, delete) |
isActive | boolean | Active status (for update) |
name | string | Form name (for update) |
ogDescription | string | null | OGP description override for the form's LIFF page preview, or null to clear (for update) |
ogImageUrl | string | null | OGP image URL override for the form's LIFF page preview, or null to clear (for update) |
ogTitle | string | null | OGP title override for the form's LIFF page preview, or null to clear (for update) |
onSubmitMessageContent | string | null | Custom message content to send after form submission (for update). If set, replaces the default confirmation Flex. |
onSubmitMessageType | Custom message type to send after form submission (for update). Supports template variables: {{name}}, {{auth_url:CHANNEL_ID}} | |
onSubmitScenarioId | string | null | Scenario to enroll on submit (for update) |
onSubmitTagId | string | null | Tag to add on submit (for update) |
saveToMetadata | boolean | Save responses to friend metadata (for update) |
manage_tracked_links
トラッキングリンクの管理操作。list: 一覧、update: 更新、delete: 削除。作成は create_tracked_link ツールを使用。
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
accountId | string | null | LINE account ID that owns this link (used to resolve the LIFF for /t/ in-app redirects), or null to clear (update only) |
introTemplateId | string | null | Message template ID for campaign intro push, or null to clear. Use {formUrl} as a placeholder inside the template body to substitute the LIFF form URL at send time. (update only) |
isActive | boolean | Whether the link is active (update only) |
linkId | string | Tracked link ID (required for update/delete) |
name | string | New link name (update only) |
ogDescription | string | null | OGP description override for the tracking link preview, or null to clear (update only) |
ogImageUrl | string | null | OGP image URL override for the tracking link preview, or null to clear (update only) |
ogTitle | string | null | OGP title override for the tracking link preview, or null to clear (update only) |
rewardTemplateId | string | null | Message template ID to push as the reward message after form submission verification passes, or null to clear. Overrides the form's built-in on_submit_message. Use this when reusing one form across mu… |
scenarioId | string | null | Scenario ID to auto-enroll on click, or null to clear (update only) |
tagId | string | null | Tag ID to auto-apply on click, or null to clear (update only) |
manage_auto_replies
自動応答の管理操作。list: 一覧、get: 詳細、create: 作成、update: 更新、delete: 削除。キーワードに一致するメッセージに自動返信する。
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
autoReplyId | string | Auto-reply ID (required for get, update, delete) |
isActive | boolean | Active status (for update) |
keyword | string | Keyword to match (for create, update) |
lineAccountId | string | null | LINE account ID filter (for list, create, update) |
matchType | string | Match type: exact or contains (for create, update) |
responseContent | string | Response message content (for create, update) |
responseType | string | Response message type (for create, update) |
manage_traffic_pools
Traffic Pool の管理。list: 一覧、create: 作成、update: 更新、delete: 削除、list_accounts: Pool内アカウント一覧、add_account: アカウント追加、remove_account: アカウント削除、toggle_account: 有効/無効切替。複数アカウントで均等分散する。
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
activeAccountId | string | LINE account ID to route traffic to (required for create; optional for update) |
isActive | boolean | Enable/disable the pool (for update) |
lineAccountId | string | LINE account ID (for add_account) |
name | string | Pool name (required for create; optional for update) |
poolAccountId | string | Pool account ID (for remove_account, toggle_account) |
poolId | string | Pool ID (required for update, delete) |
slug | string | URL slug e.g. 'main' (required for create) |
manage_entry_routes
流入リンク(entry_routes)の管理。/r/{refCode} で友だち追加したときの「タグ自動付与」「起動シナリオ」「振り分け先プール」を紐付ける。重要: manage_traffic_pools だけで /r/{slug} を作ると、コンソールの流入リンク画面に (未登録) と出てタグもシナリオも発火しない。Traffic Pool = どのLINEアカウントへ振り分けるか。entry_route = 流入時に何をするか。ファネルを組むなら両方必要。list: 一覧、create: 作成、update: 更新、delete: 削除、funnel: 流入ファネルå…
| Parameter | Type | Description |
|---|---|---|
action * | string | 実行する操作 |
id | string | entry_route の ID(update / delete / funnel で必須) |
introTemplateId | string | 友だち追加直後に push するメッセージテンプレートの ID |
isActive | boolean | 有効/無効の切り替え |
name | string | 表示名(create で必須)。コンソールの流入リンク一覧に出る |
poolId | string | 振り分け先の Traffic Pool ID。manage_traffic_pools で作った pool の id を渡すと /r/{refCode} がそのプールへ流れる |
redirectUrl | string | LINE 以外へ流したい場合のリダイレクト先 |
refCode | string | URL に入る識別子。/r/{refCode} になる(create で必須)。Traffic Pool の slug と同じ値にすると両者が紐づく |
runAccountFriendAddScenarios | boolean | アカウント既定の friend_add シナリオも併せて実行するか |
scenarioId | string | この経路で友だち追加した人に自動で開始するシナリオの ID |
tagId | string | この経路で友だち追加した人に自動付与するタグの ID |
manage_message_templates
メッセージテンプレートの管理。list: 一覧、get: 詳細取得、create: 作成、update: 更新、delete: 削除。キャンペーン特典メッセージのテンプレートを管理する。
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform |
messageContent | string | Message content — plain text or Flex JSON string (for create, update) |
messageType | string | Message type: text or flex (for create, update) |
name | string | Template name (for create, update) |
templateId | string | Template ID (required for get, update, delete) |
list_conversations
List unreplied conversations (friends who sent an incoming message with no subsequent human reply). Excludes automated outgoing (broadcast/scenario/auto_reply/reminder) and conversations marked resolved in the admin UI. Results sorted by longest wait first.
| Parameter | Type | Description |
|---|---|---|
limit | number | Number of conversations to return (max 200) |
lineAccountId | string | Filter by LINE account ID (uses default if omitted) |
maxHoursSince | number | Maximum hours since last incoming message (omit for no upper bound) |
minHoursSince | number | Minimum hours since last incoming message (default 0 = all) |
offset | number | Offset for pagination |
get_conversation
Get message history for a specific friend (both incoming and outgoing). Each message has a `source` field (user/broadcast/scenario/auto_reply/reminder/manual) indicating origin.
| Parameter | Type | Description |
|---|---|---|
friendId * | string | Friend ID (from list_friends or list_conversations) |
before | string | Return messages before this timestamp (ISO8601, for pagination) |
limit | number | Number of messages to return (max 200) |
manage_webinar_video
Upload a webinar video (HLS) from this machine and publish it. Convert the source video FIRST, in the shell — this tool does not run ffmpeg (a two-hour encode takes 30+ minutes and would exceed the tool timeout). Use exactly these arguments so segment length and keyframe interval match what the player expects: ffmpeg -hide_banner -i INPUT.mp4 \ -filter_complex "[0:v]split=3[v1][v2][v3];[v1]scale=-2:1080[v1o];[v2]scale=-2:720[v2o];[v3]scale=-2:480[v3o]" \ -map "[v1o]" -map 0:a -map "[v2o]" -map 0:a -map "[v3o]" -map 0:a \ -c:v libx264 -preset veryfast -profile:v main -pix_fmt…
| Parameter | Type | Description |
|---|---|---|
action * | string | 'upload' sends a batch of files; 'finish' publishes the revision |
revision * | string | Epoch milliseconds as a string. Use the SAME value for every upload call and for finish |
webinarId * | string | Webinar id (from list_crm_objects / the admin UI) |
dir | string | Local ffmpeg HLS output directory (required for 'upload'). master.m3u8 MUST be directly at its root — checked before anything is read or uploaded, and 'upload' fails immediately if absent. |
durationSeconds | number | Video length in seconds from ffprobe (required for 'finish') |
expectedTotal | number | Total returned by the previous upload call. Pass it on every call after the first (omit only on the first call, offset 0) so a directory that changed mid-upload is caught instead of silently dropping… |
offset | number | Index to resume from; pass the nextOffset returned by the previous call |