delete_rich_menu
Remove a rich menu from your LINE Official Account by specifying its ID to manage messaging interface elements.
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-40 (handler)The tool handler that deletes the specified rich menu ID using the LINE MessagingApiClient and returns success or error response.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:23-41 (registration)Registration of the 'delete_rich_menu' tool on the MCP server, including input schema, description, 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}`, ); } }, );
- src/tools/deleteRichMenu.ts:19-21 (schema)Zod schema definition for the 'richMenuId' input parameter.const richMenuIdSchema = z .string() .describe("The ID of the rich menu to delete.");
- src/index.ts:68-68 (registration)Top-level instantiation and registration of the DeleteRichMenu class on the main MCP server instance.new DeleteRichMenu(messagingApiClient).register(server);