rate_generate_middleware
Generate rate limiting middleware for Express, Fastify, Koa, Hono, or NestJS. Set configurable time windows and request limits to protect APIs from abuse.
Instructions
Generate rate limiting middleware for Express, Fastify, or Koa with configurable windows
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": {
"framework": "<framework>",
"window_ms": "<window_ms>",
"max_requests": "<max_requests>"
},
"name": "rate_generate_middleware"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key_by | No | Rate limit key strategy | |
| api_key | No | API key for authentication | |
| framework | Yes | Web framework | |
| window_ms | Yes | Rate limit window in milliseconds | |
| max_requests | Yes | Maximum requests per window |