Publish datafile
publish_datafilePublish a datafile to a CDN path you choose, so a page can fetch() it client-side. Only needed for that client-side fetch — NOT to bind a datafile server-side (an endpoint's @latest datafile ref reads the stored draft directly). Pass expected_content_sha256 (from the create/update/get that produced this content) — publish fails if the content changed since, so you publish the exact version you intend. Returns the public CDN URL.
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": {
"datafile_id": "<datafile_id>",
"public_path": "<public_path>",
"expected_content_sha256": "<expected_content_sha256>"
},
"name": "publish_datafile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datafile_id | Yes | the datafile id to publish | |
| public_path | Yes | the CDN path to publish at (e.g. data/products.json) | |
| expected_content_sha256 | Yes | the content_sha256 returned by the create/update/get of this datafile; publish fails if the stored content has changed since, so publish the exact version you intend |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | ||
| public_url | Yes | ||
| datafile_id | Yes |