get_rate_limit_stats
Monitor API rate limit usage for the Get笔记 MCP Server to track remaining requests and prevent service interruptions.
Instructions
获取当前API速率限制使用情况统计
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:223-233 (handler)Main tool execution handler in the MCP server switch statement. Retrieves rate limit stats from the client and returns formatted JSON text content.case 'get_rate_limit_stats': { const stats = client.getRateLimitStats(); return { content: [ { type: 'text', text: JSON.stringify(stats, null, 2), }, ], }; }
- src/index.ts:129-137 (registration)Tool registration definition including name, description, and empty input schema (no parameters required). Added to the tools array for MCP server.{ name: 'get_rate_limit_stats', description: '获取当前API速率限制使用情况统计', inputSchema: { type: 'object', properties: {}, }, }, ];
- src/index.ts:132-135 (schema)Input schema definition: empty object, indicating the tool takes no input parameters.inputSchema: { type: 'object', properties: {}, },
- src/client.ts:143-145 (helper)GetBijiClient method that delegates rate limit stats retrieval to the internal RateLimiter instance.getRateLimitStats() { return this.rateLimiter.getStats(); }
- src/rate-limiter.ts:67-75 (helper)Core RateLimiter method that computes and returns current rate limiting statistics (daily count/limit, current/max QPS).getStats() { this.resetDailyCountIfNeeded(); return { dailyCount: this.dailyCount, dailyLimit: this.dailyLimit, currentQPS: this.requestQueue.length, maxQPS: this.qps, }; }