entitlement_middleware
Generate middleware that enforces feature entitlements per subscription plan, blocking unauthorized access with configurable deny actions.
Instructions
Create middleware that enforces feature entitlements based on the user's subscription plan
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"plans": "<plans>"
},
"name": "entitlement_middleware"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plans | Yes | ||
| api_key | No | API key for authentication | |
| framework | No | nextjs | |
| deny_action | No | 403 |