Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,27 @@ LINE公式アカウントとAI Agentを接続するために、LINE Messaging AP
5. **get_profile**
- LINEユーザーの詳細なプロフィール情報を取得する。表示名、プロフィール画像URL、ステータスメッセージ、言語を取得できる。
- **入力:**
- `user_id` (string?): プロフィールを取得したいユーザーのユーザーID。デフォルトはDESTINATION_USER_ID。`user_id`または`DESTINATION_USER_ID`のどちらか一方は必ず設定する必要があります。=======
- `user_id` (string?): プロフィールを取得したいユーザーのユーザーID。デフォルトはDESTINATION_USER_ID。`user_id`または`DESTINATION_USER_ID`のどちらか一方は必ず設定する必要があります。
6. **get_message_quota**
- LINE公式アカウントのメッセージ容量と消費量を取得します。月間メッセージ制限と現在の使用量が表示されます。
- **入力:**
- なし
7. **get_rich_menu_list**
- LINE公式アカウントに登録されているリッチメニューの一覧を取得する。
- **入力:**
- なし
8. **delete_rich_menu**
- LINE公式アカウントからリッチメニューを削除する。
- **入力:**
- `richMenuId` (string): 削除するリッチメニューのID。
9. **set_rich_menu_default**
- リッチメニューをデフォルトとして設定する。
- **入力:**
- `richMenuId` (string): デフォルトとして設定するリッチメニューのID。
10. **cancel_rich_menu_default**
- デフォルトのリッチメニューを解除する。
- **入力:**
- なし

## インストール (npxを使用)

Expand Down Expand Up @@ -132,4 +148,4 @@ Claude DesktopやClaudeなどのAI Agentに次の設定を追加してくださ
}
}
}
```
```
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@
- Get the message quota and consumption of the LINE Official Account. This shows the monthly message limit and current usage.
- **Inputs:**
- None
7. **get_rich_menu_list**
- Get the list of rich menus associated with your LINE Official Account.
- **Inputs:**
- None
8. **delete_rich_menu**
- Delete a rich menu from your LINE Official Account.
- **Inputs:**
- `richMenuId` (string): The ID of the rich menu to delete.
9. **set_rich_menu_default**
- Set a rich menu as the default rich menu.
- **Inputs:**
- `richMenuId` (string): The ID of the rich menu to set as default.
10. **cancel_rich_menu_default**
- Cancel the default rich menu.
- **Inputs:**
- None

## Installation (Using npx)

Expand Down
58 changes: 58 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,64 @@ server.tool(
},
);

server.tool(
"get_rich_menu_list",
"Get the list of rich menus associated with your LINE Official Account.",
{},
async () => {
try {
const response = await messagingApiClient.getRichMenuList();
return createSuccessResponse(response);
} catch (error) {
return createErrorResponse(
`Failed to broadcast message: ${error.message}`,
);
}
},
);

server.tool(
"delete_rich_menu",
"Delete a rich menu from your LINE Official Account.",
{
richMenuId: z.string().describe("The ID of the rich menu to delete."),
},
async ({ richMenuId }) => {
try {
const response = await messagingApiClient.deleteRichMenu(richMenuId);
return createSuccessResponse(response);
} catch (error) {
return createErrorResponse(
`Failed to delete rich menu: ${error.message}`,
);
}
},
);
Comment on lines +232 to +264
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete and list

スクリーンショット 2025-05-29 8 26 37


server.tool(
"set_rich_menu_default",
"Set a rich menu as the default rich menu.",
{
richMenuId: z
.string()
.describe("The ID of the rich menu to set as default."),
},
async ({ richMenuId }) => {
const response = await messagingApiClient.setDefaultRichMenu(richMenuId);
return createSuccessResponse(response);
},
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set default

スクリーンショット 2025-05-29 9 02 18


server.tool(
"cancel_rich_menu_default",
"Cancel the default rich menu.",
{},
async () => {
const response = await messagingApiClient.cancelDefaultRichMenu();
return createSuccessResponse(response);
},
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

スクリーンショット 2025-05-29 9 04 02


async function main() {
if (!process.env.CHANNEL_ACCESS_TOKEN) {
console.error("Please set CHANNEL_ACCESS_TOKEN");
Expand Down