Skip to Content
Runbase

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).

NameTypeRequiredDescription
namestringyes
iconstringnoLucide 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.
filesobjectyesTSX 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.
entrystringnoentry file of the package (default index.tsx)
depsobjectno
permissionsobjectnoSDK permissions declared by the page
publishbooleanno
workspacestringnoWorkspace id or name (default: active workspace)

page.delete

Deletes a page and its versions.

NameTypeRequiredDescription
idstringyesPage id
workspacestringnoWorkspace id or name (default: active workspace)

page.discard

Discards a page's draft: it goes back to the published version.

NameTypeRequiredDescription
idstringyesPage id
workspacestringnoWorkspace 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.

NameTypeRequiredDescription
idstringyesPage id
draftbooleanno
workspacestringnoWorkspace 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.

NameTypeRequiredDescription
namestringno
offsetintegerno
limitintegerno
workspacestringnoWorkspace 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).

NameTypeRequiredDescription
idstringyesPage id
draftbooleanno
workspacestringnoWorkspace 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.

NameTypeRequiredDescription
workspacestringnoWorkspace id or name (default: active workspace)

page.list

Lists the workspace pages.

NameTypeRequiredDescription
workspacestringnoWorkspace 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.

NameTypeRequiredDescription
idstringyesPage id
workspacestringnoWorkspace id or name (default: active workspace)

page.restore

Restores an old version: creates a new published version with its files (any draft is discarded).

NameTypeRequiredDescription
idstringyesPage id
versionintegeryes
workspacestringnoWorkspace 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).

NameTypeRequiredDescription
idstringyesPage id
draftbooleannocapture the draft
paramsobjectnoURL parameters, e.g. {"id": "<recordId>"}
componentStateobjectnouseParam state of code blocks: {<blockId>: {<key>: value}} (same as URL parameters c.<blockId>.<key>=<JSON>), e.g. {"app": {"tab": "deals"}}
viewportstringnoOne of: desktop, mobile.
themestringnoOne of: light.
auditbooleannoalso run an axe-core accessibility audit (WCAG 2.1 A/AA): returns a11y = [{id, impact, help, nodes, targets}]
workspacestringnoWorkspace 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.

NameTypeRequiredDescription
sourcestringyesTSX to test
editsarrayno{old, new} replacements applied to source
propsobjectno
dataobjectno
permissionsobjectno
screenshotobjectno
workspacestringnoWorkspace 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.

NameTypeRequiredDescription
idstringyesPage id
namestringno
iconstringnoLucide 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.
changesarrayno
filesobjectnoTSX 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.
entrystringnoentry file of the package (default index.tsx)
depsobjectno
permissionsobjectnoSDK permissions declared by the page
publishbooleanno
reviewbooleannoautomatic review of the draft (default true, skipped on compile errors): desktop and mobile screenshots, axe-core violations and runtime errors
workspacestringnoWorkspace id or name (default: active workspace)

page.versions

Published versions of a page.

NameTypeRequiredDescription
idstringyesPage id
workspacestringnoWorkspace id or name (default: active workspace)

On this page