---
title: "MCP Tools Reference — PageWeave"
---

> For the full documentation index, see [PageWeave Documentation](https://pageweave.dev/docs) or fetch [llms.txt](https://pageweave.dev/llms.txt).

# Environments

Manage the surfaces a website is served on. Every website has a **default environment** ("live") bound to the platform subdomain — undeletable, always track-latest unless a release is attached. Additional environments (dev/staging) get a generated `*.env.pageweave.site` host; attaching custom hostnames makes them reachable on other domains. Non-default environments may have `live_reload` enabled (browser auto-reloads on content changes); the default environment never does. `*.env.*` hosts are noindex and excluded from analytics. Draft (unpublished) table rows are visible on dev environments on **template pages** only — `{% for %}` table loops and release permalinks are published-only everywhere.

## Actions

### list_environments

List all environments on a website. The default environment backs the platform subdomain; others have a generated `*.env.pageweave.site` host. Each environment shows its `current_release` (frozen manifest) or track-latest state.

### create_environment

Create a new environment (e.g. `staging`, `dev`). Free plan: default + 1 additional; Pro: up to 100. Returns the generated host URL and token.

**Parameters:**
- `website` — Website subdomain, domain, or UUID
- `name` — Lowercase letters, numbers, single hyphens (e.g. `staging`)

### update_environment

Update an environment's name or `live_reload`. **Renaming regenerates the host URL** — the token rotates and the old URL stops working permanently, so this requires user confirmation. The default environment cannot be renamed or given `live_reload`.

**Parameters:**
- `website` — Website subdomain, domain, or UUID
- `environment` — Environment name or `default`
- `name` — New name (regenerates the host URL)
- `live_reload` — Toggle live-reload websocket (dev envs only)

### delete_environment

Delete an environment. Its `*.env.pageweave.site` host stops serving; attached hostnames move to the default environment. The default environment cannot be deleted. Requires user confirmation.

## Draft rows on dev environments

Template pages (`/posts/:slug`) resolve draft rows on dev environments (the authoring surface); `{% for %}` table loops and release permalinks are published-only everywhere.

## OAuth Scopes

| Action | Scope |
|--------|-------|
| list | `environment:read` |
| create, update | `environment:write` |
| delete | `environment:delete` |

