delete_rich_menu
Remove rich menus from LINE Official Accounts to manage interface elements and maintain clean messaging experiences.
Instructions
Delete a rich menu from your LINE Official Account.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| richMenuId | Yes | The ID of the rich menu to delete. |
Implementation Reference
- src/tools/deleteRichMenu.ts:31-41 (handler)The asynchronous handler function that deletes the rich menu by calling the LINE API client's deleteRichMenu method, handles success and error responses.async ({ richMenuId }) => { try { const response = await this.client.deleteRichMenu(richMenuId); return createSuccessResponse(response); } catch (error) { return createErrorResponse( `Failed to delete rich menu: ${error.message}`, ); } }, );
- src/tools/deleteRichMenu.ts:19-30 (schema)Zod-based input schema definition for the 'richMenuId' parameter required by the tool.const richMenuIdSchema = z .string() .describe("The ID of the rich menu to delete."); server.tool( "delete_rich_menu", "Delete a rich menu from your LINE Official Account.", { richMenuId: richMenuIdSchema.describe( "The ID of the rich menu to delete.", ), },
- src/index.ts:68-68 (registration)Registers the DeleteRichMenu tool instance to the MCP server in the main entry point.new DeleteRichMenu(messagingApiClient).register(server);
- src/tools/deleteRichMenu.ts:23-41 (registration)The server.tool() call inside the register method that registers the tool with its name, description, input schema, and handler function.server.tool( "delete_rich_menu", "Delete a rich menu from your LINE Official Account.", { richMenuId: richMenuIdSchema.describe( "The ID of the rich menu to delete.", ), }, async ({ richMenuId }) => { try { const response = await this.client.deleteRichMenu(richMenuId); return createSuccessResponse(response); } catch (error) { return createErrorResponse( `Failed to delete rich menu: ${error.message}`, ); } }, );