# Propello MCP tools

Each tool returns structured data and a text equivalent. See [MCP errors](https://propello.app/docs/reference/errors) for failures.

| Tool | Scope | Annotations | Summary |
|---|---|---|---|
| `whoami` | `apps:read` | read-only, idempotent | Show the signed-in Propello account, MCP client, OAuth scopes, monthly build time remaining, app slot usage, and the docs URL. |
| `get_context` | `apps:write` | read-only, idempotent | Return everything to know before working on an app: its AGENTS.md, propello.json, git state, missing preview or production env vars, the latest release and top report findings, preview URL, relevant skills, and next step. Read fresh from the working copy on each call. |
| `get_skill` | `apps:read` | read-only, idempotent | List Propello how-to skills (call with no arguments) or read a skill's SKILL.md or one of its reference files (pass `name` and optional `file`). |
| `list_apps` | `apps:read` | read-only, idempotent | List the apps owned by the signed-in account with their kind, status, preview URL, and public address. |
| `create_app` | `apps:write` | writes | Create an app as a copy of the starter template. Returns immediately while its sandbox and preview start: poll `get_app` until status is "running", then call `get_context`. |
| `get_app` | `apps:read` | read-only, idempotent | Get one app by id, including its status, preview URL, public address, custom domain, and plan. |
| `read_file` | `apps:write` | read-only, idempotent | Read numbered lines from a UTF-8 text file inside the app's sandbox working copy. For exact edits, strip the line numbers and use `lineEndings` to recover each line's original ending. Use `offset` and `limit` for large files. |
| `edit_file` | `apps:write` | writes, destructive | Edit a file in the app's sandbox working copy by exact string replacement, returning a short diff. Fails if `oldString` is missing or ambiguous (unless `replaceAll` is true). Pass empty `oldString` to create a new file. Prefer this over `exec` for code edits. |
| `exec` | `apps:write` | writes, destructive, open-world | Run a shell command in the app's sandbox working copy (cwd: repo root, no production credentials). Use for pnpm, git, search, and `propello` CLI commands. Prefer `read_file`/`edit_file` for reading and editing code, and `repl_eval` for stateful scripts and data work. |
| `repl_eval` | `apps:write` | writes, destructive, open-world | Run JavaScript (Node) in a persistent per-app sandbox session, like a notebook: state stays between calls. Returns stdout, stderr, last expression value, and errors. Pass `stop: true` to end the session. Use `exec` for shell, git, and pnpm commands. |
| `git_commit` | `apps:write` | writes | Stage all changes in the app's working copy, commit them, and push to main. Fails if the working tree is clean. If the push fails, the local commit stays and can be retried with `git_push`. |
| `git_push` | `apps:write` | writes, idempotent | Push the app's local HEAD commit to main in its remote repository. Only fast-forward pushes are allowed. |
| `configure_app` | `apps:write` | writes, idempotent | Validate and update sections of the working copy's propello.json (`env`, `integrations`, `release`). Each supplied section replaces that section, and every entry requires a plain-language reason. Returns missing env vars and the Env page link. Commit and push with the code it configures. |
| `get_preview_url` | `apps:write` | writes, destructive | Start the app's preview dev server if needed and return its private preview URL with access token. Poll until status is "ready"; if "crashed", fix the error and retry with `restart: true`. |
| `screenshot` | `apps:write` | read-only, idempotent | Capture a PNG screenshot of a preview page (starting the dev server if needed) at the given viewport width, or fetch a stored screenshot from a check report by `shot` name. |
| `list_env_vars` | `apps:read` | read-only, idempotent | List the app's environment variable names and whether preview and production values are set (with timestamps). Values are never returned. |
| `set_env_var` | `apps:write` | writes, idempotent | Set a preview environment variable and restart the preview dev server. Production values are owner-only: targeting production returns the Env page link to give the owner. Platform-reserved names and live keys in preview are refused. Use `generate_secret` for random secrets. |
| `generate_secret` | `apps:write` | writes, destructive | Generate and store a random URL-safe base64 secret for preview, production, or both (default: both) without returning the value. Replaces any existing value for that target; the owner can view it on the Env page. |
| `delete_env_var` | `apps:write` | writes, destructive, idempotent | Delete an environment variable's value for preview, production, or both (default: both). Returns `deleted: false` if no value was set for that target. |
| `release` | `apps:write` | writes, open-world | Start releasing a pushed commit (default: latest on main) through the app's pipeline. Returns immediately: poll `release_status` until it settles. If it stops at `needs_confirmation`, give the owner its `confirmationUrl`. |
| `release_status` | `apps:read` | read-only, idempotent | Inspect one release (with `releaseId`) including status, plan, blockers, warnings, confirmation link, and rollback options for superseded releases; or omit `releaseId` to list the latest 50 releases. |
| `rollback` | `apps:write` | writes, destructive, open-world | Redeploy a superseded release's code artifact. Poll `release_status` to follow progress. If breaking migrations came after the target release, code-only rollback is refused with the Releases page link so the owner can decide whether to restore data. |
| `list_integrations` | `apps:read` | read-only, idempotent | List the app's platform integrations with their propello.json reasons, provisioning state, and whether the live release binds them, plus the Integrations page link. Removing an unbound resource is owner-only. |
| `report_problem` | `apps:read` | writes | Report a bug, abuse, or security issue with Propello or a hosted app. Optionally pass `appId` when the report concerns one of the signed-in account's apps. |

## `whoami`

- **Scope:** `apps:read`
- **Annotations:** read-only, idempotent

Show the signed-in Propello account, MCP client, OAuth scopes, monthly build time remaining, app slot usage, and the docs URL.

**Arguments:** none

## `get_context`

- **Scope:** `apps:write`
- **Annotations:** read-only, idempotent

Return everything to know before working on an app: its AGENTS.md, propello.json, git state, missing preview or production env vars, the latest release and top report findings, preview URL, relevant skills, and next step. Read fresh from the working copy on each call.

**Arguments:**
- `appId` (`string`, required)

## `get_skill`

- **Scope:** `apps:read`
- **Annotations:** read-only, idempotent

List Propello how-to skills (call with no arguments) or read a skill's SKILL.md or one of its reference files (pass `name` and optional `file`).

**Arguments:**
- `name` (`string`, optional) — Skill name to read. Omit to list all available skills.
- `file` (`string`, optional) — File within the skill to read (default: "SKILL.md", or a path under "references/").

## `list_apps`

- **Scope:** `apps:read`
- **Annotations:** read-only, idempotent

List the apps owned by the signed-in account with their kind, status, preview URL, and public address.

**Arguments:** none

## `create_app`

- **Scope:** `apps:write`
- **Annotations:** writes

Create an app as a copy of the starter template. Returns immediately while its sandbox and preview start: poll `get_app` until status is "running", then call `get_context`.

**Arguments:**
- `name` (`string`, required) — Display name for the app.
- `kind` (`"site"` \| `"app"`, required) — "site" (Astro: pages, blog, marketing) or "app" (TanStack Start: sign-in, data, files, payments).

## `get_app`

- **Scope:** `apps:read`
- **Annotations:** read-only, idempotent

Get one app by id, including its status, preview URL, public address, custom domain, and plan.

**Arguments:**
- `appId` (`string`, required)

## `read_file`

- **Scope:** `apps:write`
- **Annotations:** read-only, idempotent

Read numbered lines from a UTF-8 text file inside the app's sandbox working copy. For exact edits, strip the line numbers and use `lineEndings` to recover each line's original ending. Use `offset` and `limit` for large files.

**Arguments:**
- `appId` (`string`, required)
- `path` (`string`, required) — File path relative to the app repo root.
- `offset` (`integer`, optional) — 1-based starting line number (default: 1).
- `limit` (`integer`, optional) — Maximum number of lines to return (default: 200, max: 2000).

## `edit_file`

- **Scope:** `apps:write`
- **Annotations:** writes, destructive

Edit a file in the app's sandbox working copy by exact string replacement, returning a short diff. Fails if `oldString` is missing or ambiguous (unless `replaceAll` is true). Pass empty `oldString` to create a new file. Prefer this over `exec` for code edits.

**Arguments:**
- `appId` (`string`, required)
- `path` (`string`, required) — File path relative to the app repo root.
- `oldString` (`string`, required) — Exact text to replace. Pass "" only to create a new file (refused if a non-empty file already exists).
- `newString` (`string`, required) — Replacement text, or full file content when creating a new file.
- `replaceAll` (`boolean`, optional) — Replace every occurrence of `oldString` instead of requiring a single unique match.

## `exec`

- **Scope:** `apps:write`
- **Annotations:** writes, destructive, open-world

Run a shell command in the app's sandbox working copy (cwd: repo root, no production credentials). Use for pnpm, git, search, and `propello` CLI commands. Prefer `read_file`/`edit_file` for reading and editing code, and `repl_eval` for stateful scripts and data work.

**Arguments:**
- `appId` (`string`, required)
- `command` (`string`, required) — Shell command to run via `sh -lc`.
- `cwd` (`string`, optional) — Working directory relative to the repo root (must stay inside it).
- `timeoutMs` (`integer`, optional) — Command timeout in milliseconds (max: 600000).

## `repl_eval`

- **Scope:** `apps:write`
- **Annotations:** writes, destructive, open-world

Run JavaScript (Node) in a persistent per-app sandbox session, like a notebook: state stays between calls. Returns stdout, stderr, last expression value, and errors. Pass `stop: true` to end the session. Use `exec` for shell, git, and pnpm commands.

**Arguments:**
- `appId` (`string`, required)
- `code` (`string`, optional) — JavaScript code to evaluate in the persistent Node session. Required unless `stop: true`.
- `timeoutMs` (`integer`, optional) — Timeout in ms (default: 60000, max: 600000).
- `reset` (`boolean`, optional) — Restart the session fresh before running `code`.
- `stop` (`boolean`, optional) — End the app's REPL session instead of running code.

## `git_commit`

- **Scope:** `apps:write`
- **Annotations:** writes

Stage all changes in the app's working copy, commit them, and push to main. Fails if the working tree is clean. If the push fails, the local commit stays and can be retried with `git_push`.

**Arguments:**
- `appId` (`string`, required)
- `message` (`string`, required) — Commit message explaining why the change was made.

## `git_push`

- **Scope:** `apps:write`
- **Annotations:** writes, idempotent

Push the app's local HEAD commit to main in its remote repository. Only fast-forward pushes are allowed.

**Arguments:**
- `appId` (`string`, required)

## `configure_app`

- **Scope:** `apps:write`
- **Annotations:** writes, idempotent

Validate and update sections of the working copy's propello.json (`env`, `integrations`, `release`). Each supplied section replaces that section, and every entry requires a plain-language reason. Returns missing env vars and the Env page link. Commit and push with the code it configures.

**Arguments:**
- `appId` (`string`, required)
- `env` (`object`, optional) — Full `env` section (`required` and `optional` lists with reasons).
- `integrations` (`array`, optional) — Full `integrations` list (each entry with a reason).
- `release` (`array`, optional) — Full ordered `release` step list (each step with an id and reason).

## `get_preview_url`

- **Scope:** `apps:write`
- **Annotations:** writes, destructive

Start the app's preview dev server if needed and return its private preview URL with access token. Poll until status is "ready"; if "crashed", fix the error and retry with `restart: true`.

**Arguments:**
- `appId` (`string`, required)
- `command` (`string`, optional) — Optional dev command override (must listen on $PORT).
- `restart` (`boolean`, optional) — Restart a running or crashed dev server.
- `rotateToken` (`boolean`, optional) — Generate a new preview access token, invalidating older links.

## `screenshot`

- **Scope:** `apps:write`
- **Annotations:** read-only, idempotent

Capture a PNG screenshot of a preview page (starting the dev server if needed) at the given viewport width, or fetch a stored screenshot from a check report by `shot` name.

**Arguments:**
- `appId` (`string`, required)
- `path` (`string`, optional) — Page path on the preview (default: "/").
- `width` (`integer`, optional) — Viewport width in CSS pixels (e.g., 390 for phone, 1440 for desktop; default: 1280).
- `fullPage` (`boolean`, optional) — Capture the full scrollable page instead of only the initial viewport.
- `shot` (`string`, optional) — Name of a stored screenshot from a check report to retrieve instead of taking a fresh one.

## `list_env_vars`

- **Scope:** `apps:read`
- **Annotations:** read-only, idempotent

List the app's environment variable names and whether preview and production values are set (with timestamps). Values are never returned.

**Arguments:**
- `appId` (`string`, required)

## `set_env_var`

- **Scope:** `apps:write`
- **Annotations:** writes, idempotent

Set a preview environment variable and restart the preview dev server. Production values are owner-only: targeting production returns the Env page link to give the owner. Platform-reserved names and live keys in preview are refused. Use `generate_secret` for random secrets.

**Arguments:**
- `appId` (`string`, required)
- `key` (`string`, required) — Environment variable name (uppercase letters, digits, underscores).
- `value` (`string`, required) — Single-line value (up to 5 KB). Must not be a live credential.
- `target` (`"both"` \| `"preview"` \| `"production"`, optional) — Target environment (default: "preview"). "production" or "both" returns the Env page link for the owner.

## `generate_secret`

- **Scope:** `apps:write`
- **Annotations:** writes, destructive

Generate and store a random URL-safe base64 secret for preview, production, or both (default: both) without returning the value. Replaces any existing value for that target; the owner can view it on the Env page.

**Arguments:**
- `appId` (`string`, required)
- `key` (`string`, required) — Environment variable name to generate.
- `length` (`integer`, optional) — Secret length in characters (default: 32, range: 16-256).
- `target` (`"both"` \| `"preview"` \| `"production"`, optional) — Target environment: "preview", "production", or "both" (default: "both").

## `delete_env_var`

- **Scope:** `apps:write`
- **Annotations:** writes, destructive, idempotent

Delete an environment variable's value for preview, production, or both (default: both). Returns `deleted: false` if no value was set for that target.

**Arguments:**
- `appId` (`string`, required)
- `key` (`string`, required) — Environment variable name to delete.
- `target` (`"both"` \| `"preview"` \| `"production"`, optional) — Target environment: "preview", "production", or "both" (default: "both").

## `release`

- **Scope:** `apps:write`
- **Annotations:** writes, open-world

Start releasing a pushed commit (default: latest on main) through the app's pipeline. Returns immediately: poll `release_status` until it settles. If it stops at `needs_confirmation`, give the owner its `confirmationUrl`.

**Arguments:**
- `appId` (`string`, required)
- `commitSha` (`string`, optional) — Specific pushed commit SHA to release (default: latest commit on main).

## `release_status`

- **Scope:** `apps:read`
- **Annotations:** read-only, idempotent

Inspect one release (with `releaseId`) including status, plan, blockers, warnings, confirmation link, and rollback options for superseded releases; or omit `releaseId` to list the latest 50 releases.

**Arguments:**
- `appId` (`string`, required)
- `releaseId` (`string`, optional) — Release id to inspect. Omit to list the latest 50 releases newest-first.

## `rollback`

- **Scope:** `apps:write`
- **Annotations:** writes, destructive, open-world

Redeploy a superseded release's code artifact. Poll `release_status` to follow progress. If breaking migrations came after the target release, code-only rollback is refused with the Releases page link so the owner can decide whether to restore data.

**Arguments:**
- `appId` (`string`, required)
- `releaseId` (`string`, required) — Id of the superseded release to redeploy.

## `list_integrations`

- **Scope:** `apps:read`
- **Annotations:** read-only, idempotent

List the app's platform integrations with their propello.json reasons, provisioning state, and whether the live release binds them, plus the Integrations page link. Removing an unbound resource is owner-only.

**Arguments:**
- `appId` (`string`, required)

## `report_problem`

- **Scope:** `apps:read`
- **Annotations:** writes

Report a bug, abuse, or security issue with Propello or a hosted app. Optionally pass `appId` when the report concerns one of the signed-in account's apps.

**Arguments:**
- `kind` (`"phishing"` \| `"malware"` \| `"scam"` \| `"copyright"` \| `"privacy"` \| `"harassment"` \| `"spam"` \| `"security"` \| `"bug"` \| `"other"`, optional) — Report category (default: "bug").
- `targetUrl` (`string`, optional) — URL related to the issue.
- `description` (`string`, required) — Detailed description of the problem.
- `appId` (`string`, optional) — Optional id of the affected app.
