page
The page.* tools of the Runbase MCP server, generated from their definitions.
page.create
Creates a page from a TSX package (draft; publish: true publishes right away). Shared components are files of the package (e.g. components/card.tsx).
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
icon | string | no | Lucide icon of the page in the navigation (kebab-case, e.g. users, shopping-cart, kanban, chart-line; see lucide.dev/icons). Pick the icon that best fits the page content. Default: layout-dashboard. |
files | object | yes | TSX package: {"<relative path>": "<source>"}, e.g. {"index.tsx": "export default function Page() {…}", "components/card.tsx": "…"}. Paths are relative (no "..", no leading "/"); the entry file must be present. |
entry | string | no | entry file of the package (default index.tsx) |
deps | object | no | |
permissions | object | no | SDK permissions declared by the page |
publish | boolean | no | |
workspace | string | no | Workspace id or name (default: active workspace) |
page.delete
Deletes a page and its versions.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Page id |
workspace | string | no | Workspace id or name (default: active workspace) |
page.discard
Discards a page's draft: it goes back to the published version.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Page id |
workspace | string | no | Workspace id or name (default: active workspace) |
page.errors
Recent browser runtime errors of a page (uncaught errors, unhandled rejections, React render errors, console.error), reported by the page iframe within seconds: the published version, or the draft with draft: true. Each error has message, location (file:line:col in the package source), stack, count (deduplicated) and lastSeen; errors expire after 24 h. Open the page first (page.screenshot) to collect them.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Page id |
draft | boolean | no | |
workspace | string | no | Workspace id or name (default: active workspace) |
page.examples
Reference page packages built on @getrunbase/kit (crm, kanban, dashboard). Without name: summarized list {name, description}, paginated (offset, limit). With name: the full example (files, entry, permissions, mock data), ready for page.create. Adapt object ids and field names to the workspace.
| Name | Type | Required | Description |
|---|---|---|---|
name | string | no | |
offset | integer | no | |
limit | integer | no | |
workspace | string | no | Workspace id or name (default: active workspace) |
page.get
Reads a page package (files, entry, deps, permissions): the published version seen by users (null if never published), or the draft with draft: true (hasDraft = draft waiting for page.publish).
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Page id |
draft | boolean | no | |
workspace | string | no | Workspace id or name (default: active workspace) |
page.guide
Page guide, to read before writing a page: package structure (entry, files, relative imports), @getrunbase/sdk hooks, @getrunbase/kit blocks, permissions, strict design rules (spacing, hierarchy, empty/loading/error states, responsive, accessibility) and the @ui modules.
| Name | Type | Required | Description |
|---|---|---|---|
workspace | string | no | Workspace id or name (default: active workspace) |
page.list
Lists the workspace pages.
| Name | Type | Required | Description |
|---|---|---|---|
workspace | string | no | Workspace id or name (default: active workspace) |
page.publish
Publishes a page's draft: it becomes the version seen by users. Without a draft, changes nothing.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Page id |
workspace | string | no | Workspace id or name (default: active workspace) |
page.restore
Restores an old version: creates a new published version with its files (any draft is discarded).
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Page id |
version | integer | yes | |
workspace | string | no | Workspace id or name (default: active workspace) |
page.screenshot
PNG screenshot of a saved page as a user sees it (real workspace data, code components included), read-only: actions and workflows are not run. draft: true captures the draft (after page.update, before page.publish). Waits until every code component has finished rendering and loaders (skeletons) are gone (max 8 s). User account (OAuth) or API key. Returns the image then {errors, console}; errors include code component errors (also recorded in errors.list, source component). Use after page.create/update to check the rendering (desktop and mobile).
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Page id |
draft | boolean | no | capture the draft |
params | object | no | URL parameters, e.g. {"id": "<recordId>"} |
componentState | object | no | useParam state of code blocks: {<blockId>: {<key>: value}} (same as URL parameters c.<blockId>.<key>=<JSON>), e.g. {"app": {"tab": "deals"}} |
viewport | string | no | One of: desktop, mobile. |
theme | string | no | One of: light. |
audit | boolean | no | also run an axe-core accessibility audit (WCAG 2.1 A/AA): returns a11y = [{id, impact, help, nodes, targets}] |
workspace | string | no | Workspace id or name (default: active workspace) |
page.test
Compiles and renders a component. Without screenshot: renderToString (sandbox without network or effects) with a mock SDK serving data = {<object id>: rows[], records?: {<id>: record}, timeline?: {<recordId>: events[]}, objects?: {<id>: {name, fields}}, user?} (filter, q, sort, pagination, groupBy/aggregate applied in memory; page.examples provides full data); returns {errors, html, sdkCalls}, each SDK call outside permissions marked denied.
With screenshot: real rendering in headless Chromium (iframe runtime, compiled CSS, effects run, no network) and returns one PNG image per viewport × theme, then {errors, console, sdkCalls}. screenshot.data: "mock" (default, serves data) or "live" (real workspace reads with the permissions; actions, workflows and writes simulated). Always look at the desktop AND mobile screenshots.
| Name | Type | Required | Description |
|---|---|---|---|
source | string | yes | TSX to test |
edits | array | no | {old, new} replacements applied to source |
props | object | no | |
data | object | no | |
permissions | object | no | |
screenshot | object | no | |
workspace | string | no | Workspace id or name (default: active workspace) |
page.update
Updates a page. Name and icon apply immediately. changes is a file patch applied in order to the draft, all or nothing: {op: write, path, source} creates or replaces a file, {op: edit, path, old, new} replaces text matching once, {op: rename, from, to} (the entry follows), {op: delete, path} (not the entry). files replaces the whole package. Draft changes are invisible to users until page.publish (publish: true publishes right away). The package is recompiled: returns {page, errors} (compile errors, file:line), then, unless review: false or compile errors, review = {a11y (axe violations), pageErrors (runtime errors), renderErrors, warnings} followed by desktop and mobile screenshots of the draft.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Page id |
name | string | no | |
icon | string | no | Lucide icon of the page in the navigation (kebab-case, e.g. users, shopping-cart, kanban, chart-line; see lucide.dev/icons). Pick the icon that best fits the page content. Default: layout-dashboard. |
changes | array | no | |
files | object | no | TSX package: {"<relative path>": "<source>"}, e.g. {"index.tsx": "export default function Page() {…}", "components/card.tsx": "…"}. Paths are relative (no "..", no leading "/"); the entry file must be present. |
entry | string | no | entry file of the package (default index.tsx) |
deps | object | no | |
permissions | object | no | SDK permissions declared by the page |
publish | boolean | no | |
review | boolean | no | automatic review of the draft (default true, skipped on compile errors): desktop and mobile screenshots, axe-core violations and runtime errors |
workspace | string | no | Workspace id or name (default: active workspace) |
page.versions
Published versions of a page.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Page id |
workspace | string | no | Workspace id or name (default: active workspace) |