how_to_code_slice
Get framework-specific code examples and field documentation for implementing Prismic slice components in your project.
Instructions
PURPOSE: Provides slice and field implementation guidance for Prismic slice components.
USAGE: Use FIRST when working with any Prismic slice component or field implementation.
RETURNS: Prismic Framework-specific field documentation and code examples.
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>",
"projectFramework": "<projectFramework>",
"stylingSystem": "<stylingSystem>",
"modelAbsolutePath": "<modelAbsolutePath>",
"fieldsUsed": "<fieldsUsed>"
},
"name": "how_to_code_slice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sliceMachineConfigAbsolutePath | Yes | Absolute path to 'slicemachine.config.json' file | |
| projectFramework | Yes | Project framework (Next.js, Nuxt, or SvelteKit) | |
| stylingSystem | Yes | Detected styling system in the project (e.g., 'vanilla-css', 'tailwind', 'css-modules', 'styled-components', 'emotion', 'sass'...) | |
| modelAbsolutePath | Yes | Absolute path to the slice's 'model.json' file | |
| fieldsUsed | Yes | Field types used in the slice (from 'prismicio-types.d.ts' file) |