Create a CMS collection
create_collectionCreates a collection: from blank (a required Title field) or a starter (Blog posts, Projects, Team, Products, Events, Jobs, Testimonials, FAQ, with fields and sample items), plus extra fields and page settings. On a Xodia template or Vite React site it also installs the CMS kit when missing and creates the collection page (src/pages/collections/Page.tsx on //:slug) with its route: never hand-write collection.json, item files or that page's route. Plain HTML sites get the collection only. Writes go to the branch the workspace has open as unsaved changes the user reviews and saves in Xodia, the same as the Content tab. Works on every plan within its collection and item limits (Free: 2 collections and 100 items a site); turning a folder into a Xodia collection needs a paid plan. Reference fields (up to 10 a collection) need their target collection to exist first.
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": {
"name": "<name>",
"projectId": "<projectId>"
},
"name": "create_collection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Optional id (the folder name); default from the name | |
| from | No | "blank" (a Title field only; add yours in fields) or a starter with its fields and sample items: blog (Blog posts), projects (Projects), team (Team), products (Products), events (Events), jobs (Jobs), testimonials (Testimonials), faq (FAQ) | blank |
| name | Yes | The collection's name, like "Blog" or "Team" | |
| page | No | Collection page settings (same as update_collection page) | |
| branch | No | Optional branch; default the branch the workspace has open | |
| fields | No | Fields to add after the starter's (or after Title on blank) | |
| plural | No | ||
| samples | No | Starters: write their sample items (default true). Use false when you add your own items next | |
| singular | No | One item, like "Team member" | |
| projectId | Yes | Project id from list_projects | |
| urlFolder | No | Optional: item pages are /<urlFolder>/<slug>; one or more folder levels ("blog", "resources/blog"); default from the starter or the id |