set_subscription_tier
Configure subscription tier settings (pro, pro-plus, ultra) to manage AI service usage limits and API quotas for Cursor Pro monitoring.
Instructions
Set the subscription tier (pro, pro-plus, ultra)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tier | Yes | Subscription tier |
Implementation Reference
- src/index.ts:97-111 (registration)Registration of the 'set_subscription_tier' tool in the ListTools response, including name, description, and input schema.{ name: 'set_subscription_tier', description: 'Set the subscription tier (pro, pro-plus, ultra)', inputSchema: { type: 'object', properties: { tier: { type: 'string', enum: ['pro', 'pro-plus', 'ultra'], description: 'Subscription tier', }, }, required: ['tier'], }, },
- src/index.ts:343-379 (handler)The handler function that implements the core logic of the set_subscription_tier tool: validates the tier, updates the monitor's tier, retrieves updated stats, and formats a response with new limits and current usage.private async handleSetSubscriptionTier(args: { tier: string }) { const { tier } = args; if (!['pro', 'pro-plus', 'ultra'].includes(tier)) { throw new Error('Invalid tier. Must be one of: pro, pro-plus, ultra'); } this.monitor.updateTier(tier as SubscriptionTier); const stats = this.monitor.getUsageStats(); const content = ` # Subscription Tier Updated ## New Tier: ${tier.toUpperCase()} ## Monthly Limits - **Sonnet 4.5**: ${stats.quotas.maxSonnet45Requests} requests/month - **Gemini**: ${stats.quotas.maxGeminiRequests} requests/month - **GPT-5**: ${stats.quotas.maxGpt5Requests} requests/month - **Total**: ${stats.quotas.maxTotalRequests} requests/month ## Current Usage - **Sonnet 4.5**: ${stats.limits.sonnet45Requests}/${stats.quotas.maxSonnet45Requests} (${stats.usagePercentages.sonnet45.toFixed(1)}%) - **Gemini**: ${stats.limits.geminiRequests}/${stats.quotas.maxGeminiRequests} (${stats.usagePercentages.gemini.toFixed(1)}%) - **GPT-5**: ${stats.limits.gpt5Requests}/${stats.quotas.maxGpt5Requests} (${stats.usagePercentages.gpt5.toFixed(1)}%) - **Total**: ${stats.limits.totalRequests}/${stats.quotas.maxTotalRequests} (${stats.usagePercentages.total.toFixed(1)}%) `.trim(); return { content: [ { type: 'text', text: content, }, ], }; }
- src/index.ts:151-154 (helper)Switch case dispatcher in the CallToolRequestSchema handler that routes calls to set_subscription_tier to the specific handler method.case 'set_subscription_tier': return await this.handleSetSubscriptionTier( args as { tier: string } );