---
title: "corestack_maintenance_mode_set"
url: https://docs.corefinity.com/mcp/tools/corestack_maintenance_mode_set
type: tool
last_updated: 2026-11-13
feature: maintenance-mode
related:
  - https://docs.corefinity.com/api/reference/site-settings/update-site-maintenance-mode.md
  - https://docs.corefinity.com/guides/sites/create-and-manage/maintenance-mode.md
---
# corestack_maintenance_mode_set

**Maintenance mode.** Switch a row's maintenance page on or off. Visitors then see a holding page (503). Answers the state the site was checked in and the command that switched it. Scope: write.

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

## When to use it

Switch a row's maintenance page on or off. Visitors then see a holding page (503). Answers the state the site was checked in and the command that switched it.

## Inputs

- `site_id` (integer, ≥ 1, required): The row: the site or one of its environments.
- `enabled` (boolean, required)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "site_id": {
      "description": "The row: the site or one of its environments.",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "enabled"
  ],
  "type": "object"
}
```

## Refusals

- `deleted`: the site is deleted (in its grace period); restore it with corestack_site_restore_deleted first.
- `provisioning`: the site is still being created; wait for corestack_site_provisioning_get to finish.
- `not_running`: the site's pod refused the command (it is not running); try again once the site is running.
- `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.
- `switched_off`: the `exec` kill switch is off, and this tool runs a command in the site's pod; stop and tell the person.
- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- 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_maintenance_mode_set",
  "arguments": {
    "site_id": 4211,
    "enabled": true
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_maintenance_mode_set with site_id 4211, enabled true. (Maintenance mode.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites/{site}/maintenance](https://docs.corefinity.com/api/reference/site-settings/update-site-maintenance-mode.md)
- Guide: [Maintenance mode](https://docs.corefinity.com/guides/sites/create-and-manage/maintenance-mode.md)
