Skip to main content
Glama
wasintoh

line-oa-mcp-ultimate

by wasintoh

Design LINE Flex Message

line_design_flex
Read-onlyIdempotent

Compose validated LINE Flex Messages using pre-built Thai templates or custom JSON. Returns preview link, size, and compatibility warnings for direct sending.

Instructions

Compose a validated Flex Message ready for line_send_message. Two input modes:

  1. Template mode (recommended for Thai use cases): { template: "voucher", data: { title, code, discount, valid_until } } Available templates: receipt, voucher, shipping_update, order_confirm, appointment_reminder, promo_simple, course_cert, thank_you

  2. Raw mode (advanced): { flex_json: {...bubble or carousel JSON...}, alt_text: "..." }

  3. Discovery: { list_templates: true } returns the catalog with descriptions in Thai and required fields per template.

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:

  • Use line_design_flex first → grab flex_json → pass to line_send_message as { message: { flex_json, alt_text } }

  • Or pass { message: { template, data } } directly to line_send_message — the same templates are reused.

Examples:

  • "ออกแบบคูปอง 20% หมดวันที่ 31 ส.ค." → { template: "voucher", data: { title: "ส่วนลดวันแม่", code: "MOM20", discount: "ส่วนลด 20%", valid_until: "31 ส.ค. 2026" } }

  • "ดูว่ามี template อะไรบ้าง" → { list_templates: true }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
templateNoName of a pre-built Thai-localized Flex template. See catalog below. Mutually exclusive with flex_json.
dataNoTemplate-specific data fields. Required when template is set.
flex_jsonNoRaw Flex contents (bubble or carousel). Advanced users only. Mutually exclusive with template.
alt_textNoOptional override for altText. Defaults to a template-derived alt text.
list_templatesNoSet true to return the available template catalog instead of rendering.
Behavior4/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false. Description adds behavioral details: returns preview_url, size_bytes, warnings, and mentions Thai localization. No contradictions. Additional context like 'validated' and '30KB limit' enhances transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is well-structured with bullet points, examples, and a clear return format. Each sentence contributes meaning. Slightly long but not verbose; front-loads key modes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, description adequately documents return fields (template?, flex_json, alt_text, preview_url, size_bytes, warnings). Covers all modes, templates, and examples. Minor missing details (e.g., error handling) but sufficient for correct usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. Description adds value by explaining mutual exclusivity between template and flex_json, default alt_text behavior, and the data object's template-specific fields. The template catalog and examples provide rich semantic context beyond the 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?

Description clearly states that the tool composes a validated Flex Message ready for line_send_message. It distinguishes from sibling tools (e.g., line_send_message, line_design_card) by focusing on design/composition. Provides specific verb and resource.

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?

Explicitly describes two input modes (template and raw) and a discovery mode, with clear guidance on when to use each. Provides examples and composability workflow. Lacks explicit when-not-to-use scenarios, but context is sufficient.

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