generate_redux_toolkit_slice
Generate a Redux Toolkit slice with createSlice, async thunks, selectors, and RTK Query integration
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": {
"sliceName": "<sliceName>",
"stateFields": "<stateFields>"
},
"name": "generate_redux_toolkit_slice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sliceName | Yes | Slice name (e.g. auth, products, cart) | |
| apiBaseUrl | No | Base URL for RTK Query API | |
| stateFields | Yes | Comma-separated state field names | |
| withRtkQuery | No | Include RTK Query API slice | |
| withAsyncThunk | No | Include createAsyncThunk for API calls | |
| withEntityAdapter | No | Use createEntityAdapter for normalized state |