save_slice_data
Save or update a Prismic slice's model and mocks in your project. Validates the provided data and makes local changes to the slice library.
Instructions
PURPOSE: Creates or updates a Prismic slice model and/or mocks in your project with given valid data, performing local changes to the slice library.
USAGE: Use to validate and create/update slice data (model and/or mocks).
RETURNS: Success confirmation or detailed validation errors if the data is invalid.
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": {
"sliceMachineConfigAbsolutePath": "<sliceMachineConfigAbsolutePath>",
"sliceAbsolutePath": "<sliceAbsolutePath>",
"data": "<data>"
},
"name": "save_slice_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sliceMachineConfigAbsolutePath | Yes | Absolute path to 'slicemachine.config.json' file | |
| sliceAbsolutePath | Yes | Absolute path to the directory of the slice to be created/updated | |
| data | Yes | The data to be saved for the slice. At least one of 'model' or 'mocks' must be specified. |