set_subscription_tier
Configure subscription levels (pro, pro-plus, ultra) to manage AI service usage limits and quotas within the Cursor Pro monitoring system.
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:343-379 (handler)Executes the set_subscription_tier tool: validates tier, updates monitor tier, returns markdown with new limits and usage stats.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:97-111 (registration)Registers the tool in ListToolsRequestHandler with 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:151-154 (registration)Dispatches tool calls for set_subscription_tier to the handler in CallToolRequestHandler.case 'set_subscription_tier': return await this.handleSetSubscriptionTier( args as { tier: string } );
- src/types.ts:18-18 (schema)Type definition for valid subscription tiers used in handler validation and monitor.export type SubscriptionTier = 'pro' | 'pro-plus' | 'ultra';
- src/cursorLimitsMonitor.ts:74-77 (helper)Core helper called by handler to update quotas for the new tier and notify observers.public updateTier(tier: SubscriptionTier): void { this.quotas = this.getQuotasForTier(tier); this.notifyCallbacks(); }