mcp-server

v0.24.0
@line-harness/mcp-server Checked 9 hours ago Published 3 months ago

MCP 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.

ParameterTypeDescription
content *stringMessage 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 *stringThe friend's ID to send the message to
altTextstringCustom notification preview text for Flex Messages (shown on lock screen). If omitted, auto-extracted from Flex content.
isTestbooleanMark as test send. Prepends 【テスト配信】 to text messages, adds test banner to flex messages.
messageTypestringMessage type: 'text' for plain text, 'image' for standalone image, 'flex' for Flex Message JSON
trackLinksbooleanSet 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.

ParameterTypeDescription
messageContent *stringMessage content. For text: plain string. For flex: JSON string.
messageType *stringMessage type
title *stringInternal title for this broadcast (not shown to users)
accountIdstringLINE account ID (uses default if omitted)
altTextstringCustom notification preview text for Flex Messages (shown on lock screen). If omitted, auto-extracted from Flex content.
scheduledAtstringISO 8601 datetime to schedule. Omit to send immediately.
segmentConditionsstringJSON 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…
targetTagIdstringTag ID when targetType is 'tag'
targetTypestringTarget audience: 'all' for everyone, 'tag' for a tag group, 'segment' for filtered conditions
trackLinksbooleanSet 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.

ParameterTypeDescription
name *stringScenario name
steps *arrayOrdered list of message steps
triggerType *stringWhen to start: 'friend_add' on new friends, 'tag_added' when a tag is applied, 'manual' for explicit enrollment
accountIdstringLINE account ID (uses default if omitted)
triggerTagIdstringRequired 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.

ParameterTypeDescription
friendId *stringThe friend's ID to enroll
scenarioId *stringThe 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.

ParameterTypeDescription
action *stringAction to perform
friendIdsarrayFriend IDs to add/remove the tag from (for 'add' or 'remove' actions)
tagColorstringTag color hex code (for 'create' action, e.g. '#FF0000')
tagIdstringTag ID (for 'add' or 'remove' actions)
tagNamestringTag name (for 'create' action)

create_form

Create a form for collecting user responses. Can auto-tag responders and enroll them in scenarios.

ParameterTypeDescription
fields *stringJSON 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 *stringForm name
accountIdstringLINE account ID (uses default if omitted)
descriptionstringForm description shown to users
ogDescriptionstring | nullOGP description override for the form's LIFF page preview
ogImageUrlstring | nullOGP image URL override for the form's LIFF page preview
ogTitlestring | nullOGP title override for the form's LIFF page preview
onSubmitMessageContentstringCustom message content to send after submission. If set, replaces the default confirmation Flex.
onSubmitMessageTypestringCustom message type to send after submission. Supports template variables: {{name}}, {{auth_url:CHANNEL_ID}}
onSubmitScenarioIdstringScenario ID to auto-enroll when form is submitted
onSubmitTagIdstringTag ID to auto-apply when form is submitted
saveToMetadatabooleanSave form responses to friend metadata

create_rich_menu

Create a LINE rich menu with optional image upload. Provide imageData (base64) to attach the menu image in one step.

ParameterTypeDescription
areas *stringJSON string of menu button areas. Format: [{ bounds: { x, y, width, height }, action: { type: 'uri'|'message'|'postback', uri?, text?, data? } }]
name *stringRich menu name
chatBarTextstringText shown on the chat bar button
imageContentTypestringImage MIME type
imageDatastringBase64-encoded image data for the rich menu (PNG or JPEG, 2500x1686 or 2500x843)
selectedbooleanWhether the rich menu is displayed by default
setAsDefaultbooleanSet this as the default rich menu for all friends
sizeobjectMenu size in pixels

list_friends

List friends with optional filtering by tag, name search, or metadata values. Returns paginated results with friend details.

ParameterTypeDescription
accountIdstringLINE account ID (uses default if omitted)
limitnumberNumber of friends to return (max 100)
metadataFilterstringJSON string of metadata filters. e.g. '{"monthly_cost": "〜100万円", "business_type": "EC・物販"}'
offsetnumberOffset for pagination
searchstringSearch friends by display name (partial match)
tagIdstringFilter by tag ID

get_friend_detail

Get detailed information about a specific friend including tags, metadata, profile, and message history.

ParameterTypeDescription
friendId *stringThe friend's ID
includeMessagesbooleanInclude message history (default: false)

get_form_submissions

Get all submissions for a specific form. Returns response data with timestamps and friend IDs.

ParameterTypeDescription
formId *stringThe form ID to get submissions for

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.

ParameterTypeDescription
accountIdstringLINE 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.

ParameterTypeDescription
objectType *stringType of CRM object to list
accountIdstringLINE 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.

ParameterTypeDescription
action *stringAction to perform
configobjectPlatform 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}
displayNamestringDisplay name for the platform (e.g. 'Meta広告')
eventNamestringEvent name for test conversion (for 'test', e.g. 'Lead')
friendIdstringFriend ID for test conversion (for 'test')
isActivebooleanEnable/disable the platform (for 'update')
namestringPlatform name (required for 'create' and 'test')
platformIdstringPlatform 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.

ParameterTypeDescription
platformId *stringAd platform ID to get logs for. Use manage_ad_platforms with action 'list' first to get the ID.
limitnumberMaximum number of logs to return (default: 50)

manage_staff

スタッフアカウントの追加・一覧・更新・削除・APIキー再生成。オーナー権限が必要です。

ParameterTypeDescription
action *stringAction to perform
emailstring | nullStaff email (optional, null to clear)
isActivebooleanActivate/deactivate (for 'update')
namestringStaff name (for 'create' action)
rolestringStaff role (for 'create'/'update')
staffIdstringStaff 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.

ParameterTypeDescription
data *stringBase64-encoded image data (with or without data:image/...;base64, prefix)
filenamestringOptional original filename for reference
mimeTypestringImage MIME type

manage_friends

友だちの管理操作。count: 友だち数取得、set_metadata: メタデータ更新、set_rich_menu: リッチメニュー割当、remove_rich_menu: リッチメニュー解除。

ParameterTypeDescription
action *stringAction to perform
friendIdstringFriend ID (required for set_metadata, set_rich_menu, remove_rich_menu)
metadatastringJSON string of metadata fields to set (for 'set_metadata')
richMenuIdstringRich menu ID to assign (for 'set_rich_menu')

manage_scenarios

シナリオの管理操作。list: 一覧、get: 詳細(ステップ含む)、update: 更新、delete: 削除、add_step: ステップ追加、update_step: ステップ更新、delete_step: ステップ削除。

ParameterTypeDescription
action *stringAction to perform
accountIdstringLINE account ID for list (uses default if omitted)
conditionTypeCondition type evaluated at delivery time. tag_exists / tag_not_exists: conditionValue = tag UUID. metadata_equals / metadata_not_equals: conditionValue = JSON {"key":"...","value":...}. Unknown value…
conditionValuestring | nullCondition value (for add_step, update_step). See conditionType for format.
delayMinutesnumberDelay in minutes (for add_step, update_step)
descriptionstring | nullScenario description (for update)
isActivebooleanActive status (for update)
messageContentstringMessage content (for add_step, update_step)
messageTypestringMessage type (for add_step, update_step)
namestringScenario name (for update)
nextStepOnFalsenumber | nullNext step on false (for add_step, update_step)
onReachTagIdstring | nullTag ID to attach on step reach (for add_step, update_step; null clears)
scenarioIdstringScenario ID (required for get, update, delete, add_step, update_step, delete_step)
stepIdstringStep ID (required for update_step, delete_step)
stepOrdernumberStep order number (for add_step, update_step)
templateIdstring | nullTemplate ID reference (for add_step, update_step; null clears)
triggerTagIdstring | nullTrigger tag ID (for update)
triggerTypestringTrigger type (for update)

manage_broadcasts

配信の管理操作。list: 一覧、get: 詳細、create_draft: 下書き作成(送信しない)、update: 更新、send: 送信、send_to_segment: セグメント配信。

ParameterTypeDescription
action *stringAction to perform
accountIdstringLINE account ID (uses default if omitted)
broadcastIdstringBroadcast ID (required for get, update, send, send_to_segment)
messageContentstringMessage content (for create_draft, update)
messageTypestringMessage type (for create_draft, update)
scheduledAtstring | nullISO 8601 datetime to schedule (for create_draft, update)
segmentConditionsstringJSON string of segment conditions: {operator: 'AND'|'OR', rules: [{type, value}]} (for send_to_segment)
targetTagIdstring | nullTarget tag ID (for create_draft, update)
targetTypestringTarget type (for create_draft, update)
titlestringBroadcast title (for create_draft, update)

manage_rich_menus

リッチメニューの管理操作。list: 一覧取得、delete: 削除、set_default: デフォルト設定。作成は create_rich_menu ツールを使用。

ParameterTypeDescription
action *stringAction to perform
richMenuIdstringRich menu ID (required for delete, set_default)

manage_forms

フォームの管理操作。list: 一覧、get: 詳細、update: 更新、delete: 削除。作成は create_form ツールを使用。

ParameterTypeDescription
action *stringAction to perform
descriptionstring | nullForm description (for update)
fieldsstringJSON string of form fields array (for update)
formIdstringForm ID (required for get, update, delete)
isActivebooleanActive status (for update)
namestringForm name (for update)
ogDescriptionstring | nullOGP description override for the form's LIFF page preview, or null to clear (for update)
ogImageUrlstring | nullOGP image URL override for the form's LIFF page preview, or null to clear (for update)
ogTitlestring | nullOGP title override for the form's LIFF page preview, or null to clear (for update)
onSubmitMessageContentstring | nullCustom message content to send after form submission (for update). If set, replaces the default confirmation Flex.
onSubmitMessageTypeCustom message type to send after form submission (for update). Supports template variables: {{name}}, {{auth_url:CHANNEL_ID}}
onSubmitScenarioIdstring | nullScenario to enroll on submit (for update)
onSubmitTagIdstring | nullTag to add on submit (for update)
saveToMetadatabooleanSave responses to friend metadata (for update)

manage_auto_replies

自動応答の管理操作。list: 一覧、get: 詳細、create: 作成、update: 更新、delete: 削除。キーワードに一致するメッセージに自動返信する。

ParameterTypeDescription
action *stringAction to perform
autoReplyIdstringAuto-reply ID (required for get, update, delete)
isActivebooleanActive status (for update)
keywordstringKeyword to match (for create, update)
lineAccountIdstring | nullLINE account ID filter (for list, create, update)
matchTypestringMatch type: exact or contains (for create, update)
responseContentstringResponse message content (for create, update)
responseTypestringResponse message type (for create, update)

manage_traffic_pools

Traffic Pool の管理。list: 一覧、create: 作成、update: 更新、delete: 削除、list_accounts: Pool内アカウント一覧、add_account: アカウント追加、remove_account: アカウント削除、toggle_account: 有効/無効切替。複数アカウントで均等分散する。

ParameterTypeDescription
action *stringAction to perform
activeAccountIdstringLINE account ID to route traffic to (required for create; optional for update)
isActivebooleanEnable/disable the pool (for update)
lineAccountIdstringLINE account ID (for add_account)
namestringPool name (required for create; optional for update)
poolAccountIdstringPool account ID (for remove_account, toggle_account)
poolIdstringPool ID (required for update, delete)
slugstringURL 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: 流入ファネルå…

ParameterTypeDescription
action *string実行する操作
idstringentry_route の ID(update / delete / funnel で必須)
introTemplateIdstring友だち追加直後に push するメッセージテンプレートの ID
isActiveboolean有効/無効の切り替え
namestring表示名(create で必須)。コンソールの流入リンク一覧に出る
poolIdstring振り分け先の Traffic Pool ID。manage_traffic_pools で作った pool の id を渡すと /r/{refCode} がそのプールへ流れる
redirectUrlstringLINE 以外へ流したい場合のリダイレクト先
refCodestringURL に入る識別子。/r/{refCode} になる(create で必須)。Traffic Pool の slug と同じ値にすると両者が紐づく
runAccountFriendAddScenariosbooleanアカウント既定の friend_add シナリオも併せて実行するか
scenarioIdstringこの経路で友だち追加した人に自動で開始するシナリオの ID
tagIdstringこの経路で友だち追加した人に自動付与するタグの ID

manage_message_templates

メッセージテンプレートの管理。list: 一覧、get: 詳細取得、create: 作成、update: 更新、delete: 削除。キャンペーン特典メッセージのテンプレートを管理する。

ParameterTypeDescription
action *stringAction to perform
messageContentstringMessage content — plain text or Flex JSON string (for create, update)
messageTypestringMessage type: text or flex (for create, update)
namestringTemplate name (for create, update)
templateIdstringTemplate 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.

ParameterTypeDescription
limitnumberNumber of conversations to return (max 200)
lineAccountIdstringFilter by LINE account ID (uses default if omitted)
maxHoursSincenumberMaximum hours since last incoming message (omit for no upper bound)
minHoursSincenumberMinimum hours since last incoming message (default 0 = all)
offsetnumberOffset 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.

ParameterTypeDescription
friendId *stringFriend ID (from list_friends or list_conversations)
beforestringReturn messages before this timestamp (ISO8601, for pagination)
limitnumberNumber 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…

ParameterTypeDescription
action *string'upload' sends a batch of files; 'finish' publishes the revision
revision *stringEpoch milliseconds as a string. Use the SAME value for every upload call and for finish
webinarId *stringWebinar id (from list_crm_objects / the admin UI)
dirstringLocal 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.
durationSecondsnumberVideo length in seconds from ffprobe (required for 'finish')
expectedTotalnumberTotal 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…
offsetnumberIndex to resume from; pass the nextOffset returned by the previous call