# MCP tools

> Every Writ Cloud MCP tool, what it does, and when an assistant should use it.

Source: https://usewrit.app/docs/mcp-tools/

The Writ Cloud server (`writ-cloud`) has 40 tools. Your assistant picks them by itself; this
page is for when you want to know what it can do, or you write prompts and skills for it. Each entry
lists the inputs that matter most. `writ_help` returns the complete reference of any tool.

## Choose a tool

| Job | Tool | Use it when |
| --- | --- | --- |
| Read a page, a few pages, or a listing’s top items | writ_scrape | You need the content now. Reading never needs a browser session. |
| Run something already saved | writ_list_workflows, then writ_run_workflow | Always check first. A saved workflow comes before a new build. |
| Turn a site into an API | writ_website_to_api | The site has no usable API and you want an endpoint that lasts. |
| Collect a whole site or a section | writ_crawl_site | You want a dataset to query, export or refresh later. |
| Click, type, sign in or submit | writ_browser_use, then writ_browser_act | The job is a task on a site. Save it with writ_browser_save if it will come back. |
| Watch a page or a price | writ_create_monitor, then writ_wire_monitor | You want an alert, a workflow or an AI task when it changes. |
| Work behind a login | writ_personas | Before any task on a signed-in site. Passwords never go through the chat. |
| Get past a CAPTCHA or a code | writ_browser_ask_user | A security check or a one-time code needs you. |
| Pay on a site | writ_payment | A purchase needs your card. The number never reaches the chat. |
| Answer from data already collected | writ_search_data, writ_workflow_data | The answer may already be in past runs. Nothing runs. |
| Run on a schedule or on an event | writ_set_schedule, writ_create_automation | The job repeats, or follows another job. |
| Fix a run that returns nothing | writ_diagnose_http_workflow, then writ_update_workflow | A saved workflow fails or comes back empty. |
| Run on your own computer | writ_devices | You linked Writ Desktop and want work done there. |

> **tip:** A browser turn costs the assistant about 20,000 tokens; a run of a saved workflow about 1,000. Tools that wait take wait=true and hold one call (up to 75 seconds) instead of polling.

## Read

### `writ_scrape`

Reads one page, up to 20 pages, or a listing plus its top items, and returns clean Markdown in the
same call (usually 2 to 10 seconds). It also reads pages a plain fetch cannot: pages built by
JavaScript, pages that refuse plain requests, and pages behind your sign-in.

Main inputs

- `url` (string): The page to read, or with top_n, the listing page.
- `urls` (string[]): Several pages read together (at most 20), on one site or several.
- `top_n` (integer): With url: also read the listing’s top N item pages (at most 20).
- `format` (string): markdown, html (the raw HTML) or both.
- `render_mode` (string): auto opens a browser only when the page needs one; http never does; browser always does.
- `persona_id` (integer | string): Read as one of your saved sign-ins.
- `use_residential` (boolean): Read through a residential address, for a site that refuses servers.

```json
{
  "url": "https://news.ycombinator.com",
  "top_n": 5
}
```

## Build

### `writ_website_to_api`

Turns a website into an API with named functions. It first proposes your matching saved workflows and
ready-made APIs. Then it opens a browser bound to the build, which the assistant drives with the
browser tools until it saves the API with `writ_browser_save`.

Main inputs

- `url` (string): The page that already shows the data (a search, category or listing page), not the home page. Required unless build_id is set.
- `goal` (string): What the API should return or do, with its inputs and fields.
- `build_id` (integer): Continues a paused build, with everything it found so far.
- `persona_id` (integer): The sign-in to build with, for an app behind a login.
- `save_as` (string): Name of the saved API.
- `skip_existing` (boolean): Skip the proposal of your own matching workflows.
- `skip_marketplace` (boolean): Skip the ready-made APIs and build fresh.
- `execution_target` (string): cloud, or a linked desktop’s id to build there.

> **limit:** On Writ Cloud this tool is guided only: your assistant does the building, and there is no mode input. Builds by Writ’s own AI start from the app. The Writ Desktop server’s version of this tool adds a mode input for Writ’s own builder, which uses the AI provider set in the app.

### `writ_discovery_status`

The status of a build: `succeeded`, `failed`, `cancelled`, or `needs_guidance` (paused and ready to continue with `writ_website_to_api` and its `build_id`). See [Continue a build](https://usewrit.app/docs/mcp#continue-a-build).

Main inputs

- `build_id` (integer, required): The build’s id.
- `wait` (boolean): Hold one call until the build is done or paused.
- `timeout_seconds` (integer): Ceiling for wait, at most 75.

```json
{
  "build_id": 4703
}
```

### `writ_record_website`

Records a repeatable task as a workflow. It opens the same browser as `writ_browser_use`,
labelled with your goal. A goal that asks for an API opens as a `writ_website_to_api` build
instead.

Main inputs

- `goal` (string, required): What should be recorded, in plain words.
- `url` (string, required): The page to start on.
- `persona_id` (integer | string): The sign-in to record with.
- `auth_mode` (string): reuse a saved session, or fresh_login to record a new login.

## Browser

A browser session is a real browser on Writ’s servers (or on your linked desktop). Writ runs no AI
inside it: your assistant decides every step. Everything it does is recorded, so the session can be
saved as a workflow that replays without a browser. An open cloud browser is billed until it is saved
or closed.

### `writ_browser_use`

Opens a browser for a task on a site and returns the first page.

Main inputs

- `url` (string, required): The page to open.
- `persona_id` (integer | string): Sign in as this saved identity. The password stays in Writ.
- `goal` (string): A label for the run log. It performs no step by itself.
- `execution_target` (string): cloud, auto (your linked desktop when online, else cloud) or local (your desktop only).
- `use_residential` (boolean): Open on a residential address.
- `residential_country` (string): Two-letter country for that address, such as us.

### `writ_browser_act`

Runs one batch of actions (navigate, click, fill, select, scroll, wait, extract and more) and returns
the fresh page. A value written as `{{name}}` with its real value in `inputs` becomes an input of the saved workflow.

Main inputs

- `session_id` (string, required): The session from writ_browser_use.
- `actions` (object[], required): The actions, in order, for example {"action": "click", "selector": "#login"}.
- `inputs` (object): Values for {{name}} placeholders, kept out of the recorded steps.

### `writ_browser_context`

Re-reads an open session without acting.

Main inputs

- `session_id` (string, required): The open session.
- `section` (string): page (fields, buttons, links, cleaned page), lists (the page’s repeating rows) or map (what the build found so far).

### `writ_browser_network`

Searches or reads the requests the page made: the site’s own API, as opposed to its HTML.

Main inputs

- `session_id` (string, required): The open session.
- `operation` (string): search lists matching calls; detail returns one call in full.
- `query` (string): Text to match in the method, URL, status or bodies.
- `index` (integer): The call to read, with detail.

### `writ_browser_compose`

Shapes what the session will save: named API functions (preferably HTTP flows that run without a
browser), declared inputs and extra steps. Each function is tested as it is defined.

Main inputs

- `session_id` (string, required): The open session.
- `operation` (string, required): define_function, test_function, add_flow_step, set_inputs, add_steps, list, and the matching remove and replace operations.
- `payload` (object): The operation’s arguments. writ_help('writ_browser_compose') lists each shape.

### `writ_browser_save`

Saves the session as a workflow and closes the browser. The answer includes a ready `run_example` to prove it on two different inputs.

Main inputs

- `session_id` (string, required): The open session.
- `name` (string): Short workflow name. Defaults to the goal.
- `save_to` (string): desktop, cloud or both. Defaults to where the browser ran.
- `keep_open` (boolean): Keep the browser open after saving.
- `contribute_to_catalog` (boolean): The Marketplace choice for the saved API. Left out, the rules decide: a build made with your own AI is free, so it is submitted to the Marketplace for review once its functions pass a proof run. true submits it; false keeps it private, on Starter and up or during a trial. A build that signs in with your account is never listed without your yes. See Free builds go to the Marketplace.

### `writ_browser_ask_user`

Hands the session to you: you solve a security check in the live browser, give a one-time code, sign
in on the page, or answer a question. The first call returns a link and a message for you; later
calls wait up to 60 seconds for your answer.

Main inputs

- `session_id` (string, required): The open session.
- `kind` (string): captcha, twofa (Writ types the code; it never reaches the chat), sign_in or question.
- `question` (string): One short sentence, for question.

### `writ_browser_cancel`

Closes a session. Unsaved work that did more than visit pages is saved as a workflow first, and the
answer names it.

Main inputs

- `session_id` (string, required): The session to close.
- `discard` (boolean): true throws the unsaved work away instead of saving it.

### `writ_browser_sessions`

Lists your open browser sessions, so the assistant resumes one instead of opening a second browser.

Main inputs

- `include_closed` (boolean): Also list recently closed sessions.

## Sign-ins, payments and devices

### `writ_personas`

Your saved sign-ins on websites. With no sign-in for a site, the answer carries a link to a small Writ
window where you enter the login yourself; the assistant then waits for you to save it.

Main inputs

- `action` (string, required): list, get, request (a link for a new sign-in), wait, sign_in (refresh the session) or record_login.
- `domain` (string): With list: only sign-ins for this site. With request: the site.
- `link_id` (string): With wait: the link to wait for (up to 75 seconds per call).
- `why` (string): With request: one line you read in the window.
- `persona_id` (integer): For get, sign_in and record_login.

### `writ_payment`

Pays on a site with one of your cards. You approve each purchase in a Writ window, with a maximum
amount; the card is typed only on that store’s site. Not listed on a connection with `?payments=off`.

Main inputs

- `action` (string, required): request (ask your approval), wait, checkout (pause at the order button for your confirmation), fill or list.
- `site` (string): With request: the store’s domain.
- `max_amount` (number): The most the purchase may charge, tax and shipping included.
- `purpose` (string): One line you read when approving.
- `grant_id` (string): The approval returned by request.

### `writ_devices`

Your linked Writ Desktop computers. `use` points this connection at one of them: runs,
browser sessions, sign-ins, data and monitors then happen there. Sign-ins on a desktop come from its
own vault and never leave it.

Main inputs

- `action` (string): list, use, clear, monitors or datasets.
- `device` (string): With use: the desktop’s id or exact name.

## Workflows

### `writ_list_workflows`

Lists your saved workflows and APIs with their inputs, the values each input accepts, their schedule, and whether they are pinned as tools.

Main inputs

- `search` (string): Filter by name or description, for example a site name.

### `writ_run_workflow`

Runs a saved workflow by name or id and returns its data. It waits by default.

Main inputs

- `workflow` (string): Workflow name, or use workflow_id. A desktop workflow is local:.
- `inputs` (object): The run’s inputs. Top-level fields work too.
- `function_name` (string): Run one function of an API, with the sign-in it needs.
- `output` (object): The answer’s shape: shape (envelope, table, records, record) and fields to keep only what you need.

Run controls (every run tool)

- `wait` (boolean): Wait for the result.
- `timeout_seconds` (integer): How long to wait, at most 85. A run still going then answers running with its id.
- `max_age` (integer): Reuse a result younger than this many seconds. A reused result answers at once and costs nothing.
- `persona_id` (integer | string): Run as another saved sign-in.
- `execution_target` (string): cloud, auto or local. A local run fails while your desktop is offline.
- `device` (string): Run on this linked desktop.
- `mutation_mode` (string): For a function that writes: dry_run previews it without sending.

```json
{
  "workflow": "top-stories",
  "inputs": { "limit": 10 },
  "max_age": 600,
  "timeout_seconds": 60
}
```

### `writ_update_workflow`

Inspects or edits a saved workflow: an outline, one function’s source, targeted edits, a settings patch. It can also keep a linked copy on Writ Cloud or your desktop.

Main inputs

- `workflow` (string): Workflow name or id.
- `patch` (object): Settings to change.
- `function_updates` (object[]): Edits to named functions.
- `copy_to` (string): cloud or desktop: keep a linked copy there.
- `validate_only` (boolean): Check the edit without saving it.

### `writ_create_http_extraction`

Drafts a multi-request extraction that runs without a browser (loops, GraphQL, cursor pages) from captured requests and a plain-language goal.

Main inputs

- `goal` (string, required): Inputs, output fields, filters, order and paging wanted.
- `workflow` (string): The workflow to revise.
- `request_samples` (object[]): Calls read with writ_browser_network.
- `apply` (boolean): true writes the draft to the workflow.

### `writ_diagnose_http_workflow`

Explains why a run failed or returned nothing, and names the next fix.

Main inputs

- `workflow` (string): Workflow name or id.
- `task_id` (integer): A run to check in detail.

### `writ_pin_workflow_tool`

Pins a workflow as its own tool, named `run_`, with the workflow’s inputs plus
the run controls above. At most 20 are listed. Every workflow stays callable through `writ_run_workflow`.

Main inputs

- `workflow` (string): Workflow name or id.
- `pinned` (boolean): false unpins.

### `writ_set_schedule`

Runs a workflow automatically. On an API, it can schedule chosen functions with saved inputs.

Main inputs

- `workflow` (string): Workflow name or id.
- `every_minutes` (integer): Minutes between runs.
- `kind` (string): interval, daily or weekly.
- `time` (string): HH:MM, for daily and weekly.
- `days` (integer[]): Weekdays for weekly, 1 (Monday) to 7 (Sunday).
- `tz` (string): Time zone, such as America/Toronto.
- `functions` (string[]): Functions a scheduled run calls.
- `enabled` (boolean): Turn the schedule on or off.

### `writ_expose_workflow_api`

Publishes a workflow as a REST endpoint: a POST URL that waits for the run and returns its JSON. Calling it again reuses the same endpoint.

Main inputs

- `workflow` (string): Workflow name or id.
- `timeout_seconds` (integer): How long the endpoint waits for a run, at most 300.

## Data

### `writ_workflow_data`

Reads a workflow’s collected data as a table without running it. Long cells come back shortened; `refs` returns full records.

Main inputs

- `workflow` (string): Workflow name or id.
- `q` (string): Text filter across fields.
- `view` (string): all, latest or run (with run_id).
- `refs` (string[]): Full records by reference :, at most 100.

### `writ_search_data`

Searches everything your workflows already collected for a term, without running anything.

Main inputs

- `q` (string, required): The search term.
- `workflow` (string): Search one workflow only.

### `writ_export_data`

Exports a workflow’s full data table as CSV or JSON.

Main inputs

- `workflow` (string): Workflow name or id.
- `format` (string): csv or json.

### `writ_workflow_runs`

Run history: status, timing, errors, and whether each run happened on Writ Cloud or your desktop.

Main inputs

- `workflow` (string): One workflow, or leave it out for all.
- `status` (string): pending, running, success, failed, cancelled or skipped.

## Harvest

### `writ_crawl_site`

Collects a site or a section into a dataset, one row per page. A bounded crawl (a listing’s top items
or known pages) answers with its rows; an open one returns a crawl id to follow with `writ_crawl_status`.

Main inputs

- `url` (string, required): Where the crawl starts.
- `intent` (string): The section you want, in plain words. Writ scopes the crawl from it.
- `rank_cap` (integer): Only the top N items of a listing (at most 50).
- `seed_urls` (string[]): Exact pages to collect, instead of discovering them.
- `page_budget` (integer): The most pages to collect.
- `extract_mode` (string): markdown, schema (uniform records from CSS selectors) or html.
- `executor` (string): ai reads every page against extract_prompt, at 5 times the page rate.
- `persona_id` (integer | string): Crawl as a saved sign-in.
- `respect_robots` (boolean): Honor the site’s robots.txt.
- `save_as` (string): Save the settings as a named crawl you can run again.

> **cost:** Pages cost the same as in Harvest: 0.5 credit for a plain page, 1 for a page that needs a browser, and 10 more for a CAPTCHA a paid solver passes (Pro and up). See Harvest a site.

### `writ_crawl_status`

The status of a crawl. With `wait=true`, one call holds up to 75 seconds and returns the rows when the crawl is done.

Main inputs

- `crawl_id` (integer, required): The crawl’s id.
- `wait` (boolean): Hold until the crawl is done.

### `writ_saved_crawls`, `writ_run_saved_crawl`, `writ_saved_crawl_data`, `writ_update_saved_crawl`

Work with crawls you saved. `writ_saved_crawls` lists them. `writ_run_saved_crawl` runs one; with `max_age` it returns recent data at no cost instead of crawling again. `writ_saved_crawl_data` reads the last completed run without crawling. `writ_update_saved_crawl` shows or changes the saved settings.

Main inputs

- `crawl` (string): The saved crawl’s name, slug or id (required except for the list).
- `max_age` (integer): With writ_run_saved_crawl: reuse a run younger than this many seconds.
- `settings` (object): With writ_update_saved_crawl: the settings to change.

### `writ_crawl_files`

The original files a crawl captured (PDFs, office documents, images, CSV files), each with a short-lived download link.

Main inputs

- `crawl_id` (integer): One crawl run, or use crawl for a saved crawl’s latest run.
- `limit` (integer): Files to return, at most 200.

## Watch and automate

### `writ_create_monitor`

Watches a page and fires a change when the page, an element’s text, a value or a visual zone changes.
Without `interval`, the answer lists the check frequencies your plan allows and their cost,
and creates nothing.

Main inputs

- `url` (string, required): The page to watch.
- `interval` (string | integer): An option such as 15m or 1h, or a number of seconds.
- `selector` (string): CSS selector of the element to watch.
- `watch` (string): price also checks that the element holds a number.
- `mode` (string): visual compares the pixels of a zone, for charts, images or badges.
- `requires_browser` (boolean): Check in a real browser, for pages built by JavaScript.
- `persona_id` (integer | string): Check with a saved sign-in, for a page behind a login.

### `writ_wire_monitor`

Connects a monitor’s changes to an action.

Main inputs

- `monitor_id` (integer, required): The monitor from writ_create_monitor.
- `action` (string, required): notify, workflow or ai_task (an AI agent opens the page and works on prompt).
- `channels` (string[]): For notify: channels you set up, such as email or pushover.
- `workflow` (string): For workflow: the workflow to run.
- `threshold` (number): Price watch: act once, when the price reaches this number.
- `threshold_op` (string): lte, lt, gte or gt.
- `cooldown_minutes` (integer): For ai_task: minimum minutes between wakes.

```json
{
  "monitor_id": 812,
  "action": "notify",
  "channels": ["email"],
  "threshold": 400,
  "threshold_op": "lte"
}
```

### `writ_create_automation`

On an event, runs a workflow, sends a notification built from the event’s data, wakes an AI agent, or several of these.

Main inputs

- `name` (string, required): The automation’s name.
- `when` (string): workflow_completed, workflow_started, crawl_completed, crawl_failed, change_detected, webhook_received, scheduled, ai_session_completed or ai_session_started.
- `on_workflow` (string): The workflow whose event fires it.
- `target_id` (integer): With change_detected: the monitor.
- `run_workflow` (string): The workflow to run.
- `notify` (string): A message, with placeholders such as {{extracted.price}}.
- `channels` (string[]): Where the notification goes.
- `ai_prompt` (string): A task for an AI agent when the event fires.

### `writ_list_webhooks`

Your incoming webhook URLs, whether each is signed, and the automations it fires. Signing secrets are never shown.

## Help

### `writ_help`

The full reference of any tool, or a guide topic.

Main inputs

- `topic` (string): A tool name (including a run_ tool), guide (the full manual), actions, recording, 2fa, humanization, http_flows or flow_operators. Empty returns the list.

Connect with `?tools=all` to receive every tool’s full reference up front instead of the short
index. It costs many more tokens on every turn.

## Next

-
- [Connect an AI assistant](https://usewrit.app/docs/mcp): Set up Claude, ChatGPT, Cursor and other clients.
-
- [Writ Desktop](https://usewrit.app/docs/desktop): The local server and what it adds.
-
- [Sign-ins and secrets](https://usewrit.app/docs/personas): How personas keep passwords out of the chat.
