Create datafile
create_datafileCreate a new datafile holding a JSON object. A datafile MUST be bound to a schema (schema_id) — the schema validates the JSON and generates the human editor; author or pick one with the schema tools first. Property order in json is preserved verbatim. Publish it with publish_datafile to serve it from the CDN.
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": {
"slug": "<slug>",
"display_name": "<display_name>",
"schema_id": "<schema_id>",
"json": "<json>"
},
"name": "create_datafile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON object this datafile holds. Property order is preserved verbatim. | |
| slug | Yes | URL-safe slug, optionally hierarchical. | |
| schema_id | Yes | Id of the schema this datafile's JSON is validated against (required). The datafile's content must conform to it, and the schema generates the human editing form. | |
| description | No | What this datafile holds. | |
| display_name | Yes | Human-readable name. Required (cannot be blank). | |
| use_latest_schema | No | Validate against the latest (draft) schema version instead of the published one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | ||
| slug | Yes | ||
| schema_id | No | ||
| datafile_id | Yes | ||
| description | Yes | ||
| display_name | Yes | ||
| content_sha256 | No | ||
| last_published_path | No |