Skip to main content
Glama
wasintoh

line-oa-mcp-ultimate

by wasintoh

Prepare an image for LINE (resize + host + verify)

line_prepare_image

Resize and host images for LINE messaging, returning a prepared_key for use in imagemap or image messages. No hosting setup needed; works from file paths, URLs, or base64.

Instructions

Make any image sendable to LINE with ZERO hosting knowledge: resizes to the imagemap widths (1040/700/460/300/240), hosts them via the best available provider, HEAD-verifies every size, and returns a prepared_key that line_design_imagemap / line_send_message accept directly.

Provider chain (auto-selected, user never configures): self (HTTP deployments with MCP_PUBLIC_URL) → local-tunnel (default for stdio installs; free cloudflared quick tunnel, outbound-only so it works behind NAT) → handoff (a zip + Thai step-by-step manual instructions — nobody dead-ends).

Why this exists: LINE has no upload API for message images; they must sit on public HTTPS. IMPORTANT (live-verified 2026-07-31): LINE fetches the image when each recipient FIRST VIEWS the message — NOT at send time. Keep this MCP process (and the machine) running until most recipients have opened the message; once viewed, LINE's cache serves the image permanently (survives host shutdown and even device restarts). Default keep-alive: 24h.

Returns { prepared_key, provider, base_url?, image_url?, preview_image_url?, verified, expires_at?, handoff?, warnings }. NEVER claims false success: every returned URL was verified reachable; if verification fails (e.g. the network blocks the tunnel), the tool automatically tears the tunnel down and returns the handoff package instead.

Example: "ส่งรูปนี้เป็น Rich Message" → 1) line_prepare_image { image: { file_path: "/Users/me/promo.png" } } → 2) line_design_imagemap { prepared_key, alt_text, areas } → 3) line_send_message { message: { message_json } }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesThe source image. Provide EXACTLY ONE of file_path | base64 | source_url.
purposeNo"imagemap" (default) = Rich Message with tappable areas (needs 5 hosted sizes). "image_message" = plain image bubble (needs full + preview).imagemap
keep_alive_hoursNoHow long to keep the hosting alive (default 24h). Must cover the window until recipients FIRST VIEW the message (that's when LINE fetches); hosting also ends if this MCP process exits.
Behavior5/5

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

Annotations are minimal (readOnlyHint=false, openWorldHint=true, idempotentHint=false, destructiveHint=false). The description goes far beyond by disclosing the provider chain, auto-teardown on failure, handoff package fallback, keep-alive behavior tied to LINE's fetch-on-first-view timing, and the guarantee that 'NEVER claims false success'. This is rich, non-redundant behavioral context.

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 long but every section serves a purpose: a one-sentence overview, provider chain rationale, critical timing caveat, return contract, and a step-by-step example. It is well-structured with clear paragraph breaks and front-loaded with the most important information.

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?

Despite lacking an output schema, the description fully explains the return shape (prepared_key, provider, base_url?, etc.) and failure behavior. It covers operational nuances like process lifetime, NAT traversal, and handoff instructions, making the tool actionable in real-world scenarios.

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?

Schema coverage is 100%, but the description adds substantial value beyond the schema: warns base64 can silently corrupt and produce blank images, recommends file_path, explains Google Drive/Dropbox link rewriting for source_url, and contextualizes keep_alive_hours against the LINE fetch timing. This genuinely helps the agent choose the right input.

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 opens with a specific verb + resource: 'Make any image sendable to LINE with ZERO hosting knowledge' and details the exact pipeline (resize, host, verify, return prepared_key). It clearly distinguishes this tool from sibling tools like line_design_imagemap and line_send_message, which consume the prepared_key.

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

Usage Guidelines5/5

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

Provides explicit usage context: the tool exists because LINE lacks an upload API, and gives a concrete workflow example (ส่งรูปนี้เป็น Rich Message → prepare → design → send). It names the downstream tools that accept prepared_key, effectively guiding when to use this vs alternatives.

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