Skip to main content
Glama
wasintoh

line-oa-mcp-ultimate

by wasintoh

Link / unlink a LINE rich menu to user(s)

line_link_rich_menu
Idempotent

Attach or detach a rich menu to specific LINE users, enabling per-user menu customization for different segments.

Instructions

Attach or detach a rich menu for specific LINE users. A per-user menu overrides the account-wide default, so this is the way to show different menus to different segments (e.g. paying members vs. free users).

Pass a single user_id (per-user endpoint) or a list of user_ids (bulk endpoint, auto-chunked into batches of 500). Unlinking a user makes them fall back to the account default menu (if any).

Args:

  • mode: 'link' (attach) | 'unlink' (detach).

  • rich_menu_id: Required for mode='link'; ignored for unlink.

  • user_id: A single LINE user ID, OR

  • user_ids: A list of LINE user IDs (bulk, auto-chunked at 500/batch).

  • oa: Optional OA id.

Returns: { mode: "link" | "unlink", linked_count?: number, // present when mode='link' unlinked_count?: number, // present when mode='unlink' rich_menu_id?: string, // present when mode='link' chunks?: number // number of bulk batches sent (bulk path only) }

Examples:

  • "ผูก rich menu R123 ให้ user U1" → { mode: "link", rich_menu_id: "R123", user_id: "U1" }

  • "ผูก rich menu R123 ให้สมาชิก 800 คน" → { mode: "link", rich_menu_id: "R123", user_ids: [...800 ids] } (sent as 2 chunks)

  • "ถอด rich menu ของ user U1" → { mode: "unlink", user_id: "U1" }

Errors:

  • mode='link' without rich_menu_id → returns input error

  • neither user_id nor user_ids → returns input error

  • 404 → user has no rich menu linked (unlink), or rich_menu_id not found (link)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYeslink: attach a rich menu to user(s); unlink: detach the per-user menu (falls back to default).
rich_menu_idNoRich menu ID. Required for mode='link'; ignored for unlink.
user_idNoSingle LINE user ID. Provide this OR user_ids (not both needed).
user_idsNoList of LINE user IDs. Uses the bulk endpoint, auto-chunked into batches of 500.
oaNoOptional OA id; defaults to active OA.
Behavior5/5

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

The description details auto-chunking, error behaviors, and return structure, adding value beyond annotations. No contradictions with annotations.

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?

The description is well-structured with sections for args, returns, examples, and errors. While slightly verbose, each part is justified and contributes to clarity.

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 tool's complexity, the description covers parameter conditions, return output, error cases, and usage context. Annotations complement, and no output schema is needed.

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?

The schema already covers parameters with 100% description coverage, but the description adds conditional logic (rich_menu_id ignored for unlink, user_id vs user_ids) and auto-chunking explanation.

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 the tool attaches or detaches a rich menu for specific LINE users, distinguishing it from account-wide default settings. It explicitly contrasts with sibling tools like line_set_default_rich_menu.

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 explains when to use per-user menus for segmentation and how unlink reverts to default. It provides examples but does not explicitly state when not to use this tool.

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