get_message_quota
Check monthly message limits and current usage for LINE Official Accounts to monitor API quota consumption.
Instructions
Get the message quota and consumption of the LINE Official Account. This shows the monthly message limit and current usage.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/getMessageQuota.ts:19-28 (handler)The core handler function for the 'get_message_quota' tool. It retrieves the message quota and consumption from the LINE Messaging API client, combines them into a response object with 'limited' quota and 'totalUsage', and returns a formatted success response.async () => { const messageQuotaResponse = await this.client.getMessageQuota(); const messageQuotaConsumptionResponse = await this.client.getMessageQuotaConsumption(); const response = { limited: messageQuotaResponse.value, totalUsage: messageQuotaConsumptionResponse.totalUsage, }; return createSuccessResponse(response); },
- src/tools/getMessageQuota.ts:14-30 (registration)The 'register' method in the GetMessageQuota class that registers the tool on the MCP server, including the tool name, description, empty input schema ({}), and the handler function.register(server: McpServer) { server.tool( "get_message_quota", "Get the message quota and consumption of the LINE Official Account. This shows the monthly message limit and current usage.", {}, async () => { const messageQuotaResponse = await this.client.getMessageQuota(); const messageQuotaConsumptionResponse = await this.client.getMessageQuotaConsumption(); const response = { limited: messageQuotaResponse.value, totalUsage: messageQuotaConsumptionResponse.totalUsage, }; return createSuccessResponse(response); }, ); }
- src/index.ts:66-66 (registration)Top-level registration in the main entry point: instantiates GetMessageQuota with the messaging API client and calls its register method on the MCP server.new GetMessageQuota(messagingApiClient).register(server);
- src/index.ts:31-31 (registration)Import statement for the GetMessageQuota tool class in the main index file.import GetMessageQuota from "./tools/getMessageQuota.js";