---
title: "corestack_deployments_mode_set"
url: https://docs.corefinity.com/mcp/tools/corestack_deployments_mode_set
type: tool
last_updated: 2026-11-13
feature: deployments
related:
  - https://docs.corefinity.com/api/reference/deployments/update-site-deployment-mode.md
  - https://docs.corefinity.com/guides/sites/code-and-deployments/connect-a-repository.md
---
# corestack_deployments_mode_set

**Switch deployment mode.** Switch a row between manual uploads and Git deployments. Switching to manual first copies the live files out of the current release: do not write the site's files until the task ends (later writes into the release are not carried over). A Laravel site answers an error page while the application rebuilds at the end — the task's steps show when that has finished. Scope: write. Long-running: answers with a task.

- Scope: `write`
- Runs as a task: yes

## When to use it

Switch a row between manual uploads and Git deployments. Switching to manual first copies the live files out of the current release: do not write the site's files until the task ends (later writes into the release are not carried over). A Laravel site answers an error page while the application rebuilds at the end — the task's steps show when that has finished.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `mode` (one of `manual`, `git`, required)
- `reconvert` (boolean): Only with git, while a conversion is pending: convert again.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "mode": {
      "enum": [
        "manual",
        "git"
      ],
      "type": "string"
    },
    "reconvert": {
      "description": "Only with git, while a conversion is pending: convert again.",
      "type": "boolean"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "mode"
  ],
  "type": "object"
}
```

## Refusals

- `forbidden`: the person's role lacks the Manage Deployment Source permission. The message names it and says an owner
  of the company can grant it in Roles; `details.permission` is `manageDeploymentSource`. Nothing is changed. Also
  `forbidden` when switching to `git` would make a push deploy on its own again (automatic deployment was left on) and
  the role lacks the Create Deployments permission (`createDeployments`); nothing is started.
- `deployment_running`: a deployment, or its rollback, is running on the row; wait for it to finish.
- `busy`: another change is running on this row; wait for it (corestack_site_operation_get) and call again.
- `command_running`: a command is still running on the row; wait for it to finish.
- `bedrock_layout`: the site is WordPress built with Bedrock, which cannot switch to `manual` yet (the switch would keep only its web folder and leave the rest of the project behind); nothing changed. Leave it on Git and deploy its code through its repository. A task that ends failed with the same words was refused the same way, before anything was copied.
- `layout_unknown`: switching a WordPress site to `manual`, the Control Panel could not confirm whether it is built with Bedrock; nothing changed. Call again in a minute.
- `deleted`: the site is deleted (in its grace period); restore it with corestack_site_restore_deleted first.
- `removed`: the row has been removed.
- `managed_elsewhere`: this is managed in another place (for example by the agency that manages the site); change it there.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_deployments_mode_set",
  "arguments": {
    "site_id": 4211,
    "mode": "manual"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_deployments_mode_set with site_id 4211, mode manual. (Switch deployment mode.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [PUT /api/corestack/sites/{site}/deployments/mode](https://docs.corefinity.com/api/reference/deployments/update-site-deployment-mode.md)
- Guide: [Connect a repository](https://docs.corefinity.com/guides/sites/code-and-deployments/connect-a-repository.md)
