set_rich_menu_default
Set a default rich menu for LINE Official Accounts to display automatically to all users, providing consistent navigation and interaction options.
Instructions
Set a rich menu as the default rich menu.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| richMenuId | Yes | The ID of the rich menu to set as default. |
Implementation Reference
- src/tools/setRichMenuDefault.ts:28-31 (handler)The handler function that executes the tool: calls setDefaultRichMenu on the LINE MessagingApiClient with the provided richMenuId and returns a formatted success response.async ({ richMenuId }) => { const response = await this.client.setDefaultRichMenu(richMenuId); return createSuccessResponse(response); },
- Zod schema defining the input parameter 'richMenuId' as a string with description.const richMenuIdSchema = z .string() .describe("The ID of the rich menu to set as default.");
- src/tools/setRichMenuDefault.ts:20-32 (registration)Registers the 'set_rich_menu_default' tool on the MCP server, specifying name, description, input schema, and handler function.server.tool( "set_rich_menu_default", "Set a rich menu as the default rich menu.", { richMenuId: richMenuIdSchema.describe( "The ID of the rich menu to set as default.", ), }, async ({ richMenuId }) => { const response = await this.client.setDefaultRichMenu(richMenuId); return createSuccessResponse(response); }, );
- src/index.ts:69-69 (registration)Instantiates the SetRichMenuDefault tool with the messaging API client and registers it to the main MCP server instance.new SetRichMenuDefault(messagingApiClient).register(server);