Create record
create_recordAdd a record to a data model by passing its model ID or slug and field-keyed data, including product records with stock. Use it to create CMS entries and get the record's live storefront URL.
Instructions
Add a record (entry) to a data model. Pass the model id or slug and a data object whose keys are the model's field keys (use get_model first if unsure). A product is a record too: pass a model whose product capability is enabled (get_model shows product.enabled), and list_products then lists it with its stock. Each record carries url: its live storefront link, built by the server from the model's urlPattern and the site's public site URL. Use it whenever you link to a record and never build a storefront URL yourself (not from a slug, not from the site address). When url is null or missing, say why instead of guessing: the model has no urlPattern (set it with update_model), the model is not delivered (deliveryAccess none, or it is the login model), the site has no public site URL, or the record - or one it links to - is unpublished.
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": {
"modelIdOrSlug": "<modelIdOrSlug>",
"data": "<data>"
},
"name": "create_record"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Field values keyed by the model's field keys. A translatable field (localized: true on the model) takes a language map, e.g. { title: { en: 'Ball bearing', pl: 'Łożysko' } } | |
| published | No | Whether the record goes live on the site and delivery API (default true). false creates it hidden from every public read until published; the workspace draft secret still previews it. | |
| modelIdOrSlug | Yes | The target model's id or slug (from list_models) |