Skip to content

Collections Tools

Collections are schemas plus items. They are the right tool for any content that:

  • Has a repeating structure (blog posts, team members, products)
  • Needs to be listed and individually linked
  • May grow over time
TypeUse for
textShort strings
textareaMulti-line plain text
richtextHTML body content
dateISO 8601 date
numberNumeric values
booleanTrue/false toggle
imageCDN image URL
urlWeb address
selectDropdown — provide options: [...]

Field names must be lowercase ASCII — [a-z][a-z0-9_-]*. The label (displayed in the portal UI) can be any text.

WrongRight
Titeltitle
Datumdate (or datum — fine, it’s ASCII)
Författareforfattare

Defines the collection schema. Once items exist, avoid renaming fields — it doesn’t migrate existing data.

Important options:

  • slug_field — which field is used for URLs (typically "slug")
  • sort_field + sort_dir — default sort for listings
  • route_template — URL pattern for individual items: "/blog/{slug}"

Adds an item to the collection with its field values.

Add a blog post: "Vår designfilosofi" — slug "var-designfilosofi",
published 2025-05-15, author Anna Lindström, excerpt "Vi tror på enkelhet..."

Returns all items in a collection. Claude uses this to regenerate listing HTML when new items are added.

Updates one or more fields on an existing item.

Deletes an item. The listing page will need to be regenerated afterwards.

Since Typeroll generates a static site with no template engine, listings are HTML pages Claude writes from the current collection items. When items change, Claude:

  1. Fetches the updated item list via list_collection_items
  2. Regenerates the listing HTML
  3. Updates the listing page via update_page

This is explicit and intentional — you get full control over the listing design.