Skip to main content
Glama
wasintoh

line-oa-mcp-ultimate

by wasintoh

Design LINE Card Message (Template)

line_design_card
Read-onlyIdempotent

Build and validate LINE template messages (card messages) for buttons, confirm, carousel, and image_carousel subtypes. Returns JSON ready to send via line_send_message.

Instructions

Build a validated Template message (LINE OA Manager calls this a "Card Message") and return it as JSON, ready to hand to line_send_message. DESIGN ONLY — this never calls the LINE API; it just builds + validates the message object. Supports all four LINE template subtypes.

Subtypes (set via kind) and their LINE limits:

  • buttons → { title?, text, thumbnail_image_url?, actions } — 1..4 buttons. text ≤60 chars with title/thumb, else ≤160.

  • confirm → { text, actions } — exactly 2 buttons (e.g. ตกลง / ยกเลิก).

  • carousel → { columns } — ≤10 columns, each ≤3 buttons. EVERY column must have the SAME number of buttons (LINE rule). Each column: { title?, text, thumbnail_image_url?, default_action?, actions }.

  • image_carousel → { columns } — ≤10 columns, each { image_url (HTTPS), action }.

Action shape (used in actions / default_action / image_carousel action): { type:"uri", label, uri } | { type:"message", label, text } | { type:"postback", label, data, displayText? } label ≤20 chars. uri accepts http/https/tel/line.

Args:

  • kind: one of buttons | confirm | carousel | image_carousel (required).

  • alt_text: fallback text (1..400 chars, required).

  • title?, text?, thumbnail_image_url?, actions? — used by buttons/confirm.

  • columns? — used by carousel/image_carousel.

Returns: { message: , usage_hint: string }

Composability:

  • Build here → grab message → send via line_send_message (raw message passthrough).

Examples:

  • "การ์ดยืนยันการจอง ตกลง/ยกเลิก" → { kind: "confirm", alt_text: "ยืนยันการจอง", text: "ยืนยันการจองคิวเวลา 14:00 ไหม?", actions: [ { type: "postback", label: "ตกลง", data: "confirm=1" }, { type: "message", label: "ยกเลิก", text: "ยกเลิก" } ] }

  • "การ์ดเมนู 3 ปุ่ม มีรูป" → { kind: "buttons", alt_text: "เมนูร้าน", title: "ร้านกาแฟ", text: "เลือกเมนูที่สนใจ", thumbnail_image_url: "https://cdn.example.com/cover.jpg", actions: [ { type: "uri", label: "ดูเมนู", uri: "https://shop.example.com/menu" }, { type: "message", label: "โปรวันนี้", text: "โปรวันนี้" } ] }

Errors:

  • "buttons: ต้องมี actions อย่างน้อย 1 ปุ่ม" → supply actions for kind=buttons

  • "confirm: ต้องมี 2 ปุ่มเป๊ะ" → confirm needs exactly two

  • "carousel: ทุก column ต้องมีจำนวน action เท่ากัน" → equalize button counts across columns

  • "action.label ยาวเกิน 20 ตัวอักษร" → shorten the label

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesCard subtype. Determines which other fields are required.
alt_textYesFallback text shown in push notification + chat list (1..400 chars).
titleNo[buttons] Optional card title.
textNo[buttons] body (≤60 with title/thumb, else ≤160). [confirm] question (required).
thumbnail_image_urlNo[buttons] Optional HTTPS thumbnail.
actionsNo[buttons] 1..4 buttons. [confirm] exactly 2 buttons.
columnsNo[carousel] ≤10 columns (same action-count each). [image_carousel] ≤10 columns.
Behavior5/5

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

Description details that the tool does not call the LINE API (readOnly), validates messages, returns a usage_hint, and lists error conditions. This goes beyond the annotations (readOnlyHint, idempotentHint) to explain exact behavior and limitations.

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-organized into sections (purpose, subtypes, action shape, args, returns, composability, examples, errors). It is front-loaded with essential information and every sentence is informative 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 (4 subtypes, nested actions, validation rules) and no output schema, the description is exceptionally complete: it covers all user-relevant aspects, return format, and error handling.

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?

Despite 100% schema coverage, the description adds significant meaning: explains subtype-specific parameters, char limits, button count rules, and provides Thai error messages and examples. This greatly aids proper parameter usage.

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 it builds and validates a LINE Card Message, returning JSON for sending via line_send_message, and explicitly notes it does not call the LINE API. It differentiates from sibling tools like line_design_flex and line_send_message.

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

Usage Guidelines4/5

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

The description provides clear usage context: use for designing templates only, then send with line_send_message. It does not explicitly state when NOT to use, but the composability hint and 'DESIGN ONLY' make it clear. Alternatives are not listed, but sibling names imply differentiation.

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