get_rate_limit_stats
Monitor API rate limit usage statistics to track remaining requests and avoid service interruptions in the Get笔记 knowledge base system.
Instructions
获取当前API速率限制使用情况统计
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:223-233 (handler)MCP server tool handler for 'get_rate_limit_stats': calls client.getRateLimitStats() and returns stats as 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-136 (schema)Tool schema definition including name, description, and empty input schema (no parameters required).{ name: 'get_rate_limit_stats', description: '获取当前API速率限制使用情况统计', inputSchema: { type: 'object', properties: {}, }, },
- src/client.ts:143-145 (helper)GetBijiClient.getRateLimitStats() method: delegates to internal RateLimiter.getStats().getRateLimitStats() { return this.rateLimiter.getStats(); }
- src/rate-limiter.ts:67-75 (helper)RateLimiter.getStats() core implementation: resets daily count if needed and returns current daily usage and QPS statistics.getStats() { this.resetDailyCountIfNeeded(); return { dailyCount: this.dailyCount, dailyLimit: this.dailyLimit, currentQPS: this.requestQueue.length, maxQPS: this.qps, }; }