# Pages Tools
Source: [Pages Tools](https://typeroll.com/docs/tools/pages/)
> Tools for creating, reading, updating and managing pages on your Typeroll site.
Content edits are drafts until you save
`update_page`, `replace_page` and every block edit land in a working copy, not on the page itself. Say “save it” when you’re happy, then deploy. See [Drafts & Saving](https://typeroll.com/docs/tools/drafts-and-saving/). Page **status** is the exception — publishing or unpublishing applies immediately.
## Page fields
[Section titled “Page fields”](https://typeroll.com/docs/tools/pages/#page-fields)
| Field | Type | Description |
| ----------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title` | string | Page title. Used in nav and as default `
` tag. |
| `slug` | string | URL path. `""` = homepage. No leading slash. |
| `content_mode` | `"blocks"` \| `"html"` | `"blocks"` is the default for new pages. See [Blocks](https://typeroll.com/docs/tools/blocks/) for the block-mode editing surface. |
| `html_content` | string | Full page body HTML — used when `content_mode === "html"`. |
| `blocks` | `Block[]` | Block tree — used when `content_mode === "blocks"`. Edit via `add_block`, `update_block`, `move_block`, `remove_block`, `duplicate_block`. |
| `template` | string | Optional PageTemplate id. The renderer composes the template’s block tree with the page’s `blocks` at build time. |
| `status` | `"published"` \| `"draft"` \| `"review"` \| `"unlisted"` | Only `published` and `unlisted` pages are built into the static site. `unlisted` pages are reachable by URL but excluded from listings and the sitemap. |
| `publish_at` | string | ISO 8601. Schedule the page to go live automatically at this time. Cleared once it fires. |
| `unpublish_at` | string | ISO 8601. Schedule the page to come down automatically. |
| `kind` | `"page"` \| `"article"` | `"article"` enables Article JSON-LD schema. |
| `seo_title` | string | Custom `` tag. Defaults to `title + suffix`. |
| `seo_description` | string | ``. 150–160 chars recommended. |
| `og_image` | string | Absolute CDN URL for Open Graph image. |
| `canonical_url` | string | Override the canonical URL (e.g. after a migration). |
| `noindex` | boolean | Set `true` to add ``. |
| `language` | string | Per-page language override (e.g. `"en"`, `"sv"`). |
| `author` | string | Article author. Used in Article JSON-LD. |
| `date_published` | string | ISO 8601 date. Used in Article JSON-LD. |
| `json_ld` | string | Custom JSON-LD schema as a JSON string. |
## Homepage
[Section titled “Homepage”](https://typeroll.com/docs/tools/pages/#homepage)
The homepage has `slug: ""` and is stored with `id: "home"`. The AI agent uses this automatically when you say “the homepage” or “the start page”.
Caution
There can only be one homepage per site. Creating a second page with `slug: ""` returns a 409 error.
## `create_page`
[Section titled “create\_page”](https://typeroll.com/docs/tools/pages/#create_page)
Creates a new page. Required: `title`. Defaults: `status: "draft"`, `content_mode: "blocks"`. The AI agent picks the block library to compose the body unless you ask for HTML mode explicitly.
```plaintext
Create a page titled "Tjänster" at slug "tjanster" with three service sections.
```
## `set_page_mode`
[Section titled “set\_page\_mode”](https://typeroll.com/docs/tools/pages/#set_page_mode)
Switches a page between `"html"` and `"blocks"` modes. Snapshots a revision first. With `convert: true` (only meaningful for `html → blocks`), runs the heuristic converter so the page starts with a populated block tree rather than empty.
```plaintext
Convert the About page to blocks mode.
→ set_page_mode page_id=about to=blocks convert=true
```
## `convert_page_to_blocks`
[Section titled “convert\_page\_to\_blocks”](https://typeroll.com/docs/tools/pages/#convert_page_to_blocks)
Dry-run preview of the heuristic HTML→blocks converter. Returns the proposed tree without writing. Useful before committing the flip on a long page.
## `update_page`
[Section titled “update\_page”](https://typeroll.com/docs/tools/pages/#update_page)
Updates one or more fields on an existing page. Pass only the fields you want to change — others are preserved.
```plaintext
Update the Services page: change the seo_description to "..."
```
## `batch_update_pages`
[Section titled “batch\_update\_pages”](https://typeroll.com/docs/tools/pages/#batch_update_pages)
Updates multiple pages in one call. More efficient than individual updates for bulk changes like SEO fixes.
```plaintext
Write meta descriptions for all pages.
```
The AI agent uses `batch_update_pages` automatically for multi-page operations.
## `list_pages`
[Section titled “list\_pages”](https://typeroll.com/docs/tools/pages/#list_pages)
Returns all pages with title, slug, status and SEO fields — but not the HTML body (to keep responses small).
Add `full: true` to include `html_content` — use sparingly on large sites.
## `read_page`
[Section titled “read\_page”](https://typeroll.com/docs/tools/pages/#read_page)
Returns a single page including its full `html_content`. The AI agent uses this before editing a page.
## `batch_read_pages`
[Section titled “batch\_read\_pages”](https://typeroll.com/docs/tools/pages/#batch_read_pages)
Reads multiple pages by ID in one call. Returns `{ pages_by_id: { id: page }, not_found: [] }`.
## `search_pages`
[Section titled “search\_pages”](https://typeroll.com/docs/tools/pages/#search_pages)
Finds pages containing a substring in their HTML content:
```plaintext
search_pages contains="