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

# import_table_rows, export_table_csv, get_import_status

Bulk CSV import and export for data tables.

> **Full documentation:** [Data Tables](/docs/tables) — Liquid access, public JSON API, template pages, and more.

## Actions

### import

Import rows into a table from CSV. The CSV may come from a `source_url` the server fetches (HTTPS only, SSRF-guarded, ≤50 MB) or inline `content` (small imports only); if both are given, `source_url` wins.

**Parameters:**
- `table_id` — Table UUID
- `source_url` — HTTPS URL of the CSV to import (optional)
- `content` — Inline CSV content (optional, small imports only)
- `mode` — `create` (default) or `upsert` (match rows by an `id` column)
- `column_mapping` — Rename CSV columns to table field names, e.g. `{ "Product Name" => "name", "Go-Live" => "published_at" }`
- `dry_run` — Validate and project results without writing

**Publish state** is per-row via a reserved `published_at` CSV column: empty = draft (new rows) / keep current (upsert), `-` or `draft` = draft, `now` = publish now, ISO 8601 = schedule.

≤25,000 rows run synchronously and return `created`/`updated`/`skipped`/`failed` keyed by data-row number; larger runs are async — the response returns a `run_id`, poll with `get_import_status`. Unknown columns are ignored. Skip-unchanged: identical rows get no new version (publish state is left as-is on upsert).

### export

Export a table's rows as CSV. The header is `id` plus the table's schema fields; the output round-trips through `import_table_rows` with `mode: "upsert"` (export → edit → reimport).

**Parameters:**
- `table_id` — Table UUID

### get_import_status

Poll the status of an async import.

**Parameters:**
- `run_id` — Import run UUID returned by `import_table_rows`

Returns `pending`/`processing`/`completed`/`failed`, counts, and the full created/updated/skipped/failed result arrays once completed.

## OAuth Scopes

| Action | Scope |
|--------|-------|
| import | `row:write` |
| export | `row:read` |
| get_import_status | `row:read` |

