pwa_generate_sw
Generate a service worker with caching strategies and lifecycle management to control offline behavior and asset caching.
Instructions
Generate a service worker with caching strategies and lifecycle management
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": {
"strategy": "<strategy>"
},
"name": "pwa_generate_sw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | API key for authentication | |
| strategy | Yes | Primary caching strategy | |
| use_workbox | No | Use Workbox library | |
| precache_routes | No | Routes to precache |