Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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); },
  • 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";

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tndfame/mcp_management'

If you have feedback or need assistance with the MCP directory API, please join our Discord server