---
title: "corestack_nginx_corefinity_rules_move"
url: https://docs.corefinity.com/mcp/tools/corestack_nginx_corefinity_rules_move
type: tool
last_updated: 2026-11-13
feature: nginx-rules
related:
  - https://docs.corefinity.com/api/reference/site-settings/move-site-corefinity-nginx-rules.md
  - https://docs.corefinity.com/guides/sites/site-settings/web-server-rules.md
---
# corestack_nginx_corefinity_rules_move

**Move Corefinity rules into my rules.** Move the nginx rules Corefinity set up on an environment row (shown read-only by corestack_nginx_rules_get) into the row's own server rules, where they can be edited. Only blocks that answer every path exactly as before are moved; the move takes about a minute to apply. Needs the version corestack_nginx_rules_get answered. Scope: write. Long-running: answers with a task.

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

## When to use it

Move the nginx rules Corefinity set up on an environment row (shown read-only by corestack_nginx_rules_get) into the row's own server rules, where they can be edited. Only blocks that answer every path exactly as before are moved; the move takes about a minute to apply. Needs the version corestack_nginx_rules_get answered.

`corefinity_rules.blocks` in corestack_nginx_rules_get lists each block with `from_line`, `to_line`, `movable` and the reasons a block stays. The moved blocks go to the top of the server rules in their order. A started move answers a task on its `nginx_rules_move` operation. A move applies now; `apply: tonight` is refused until the night batches take moves.

## Inputs

- `site_id` (integer, ≥ 1, required): The environment row.
- `version` (integer, ≥ 0, required): The version from corestack_nginx_rules_get.
- `blocks` (list of integers, ≥ 1): The from_line of each Corefinity block to move (corefinity_rules.blocks); default every movable block.
- `apply` (string, `now` or `tonight`): now (default). Tonight is refused until the maintenance window can take a move (not_admitted).
- `test_id` (integer, ≥ 1): A passed test for this same move.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "apply": {
      "default": "now",
      "description": "now (default). Tonight is refused until the maintenance window can take a move (not_admitted). window: the row's next maintenance window (tonight is kept as its alias).",
      "enum": [
        "now",
        "window",
        "tonight"
      ],
      "type": "string"
    },
    "blocks": {
      "description": "The from_line of each Corefinity block to move (corefinity_rules.blocks); default every movable block.",
      "items": {
        "minimum": 1,
        "type": "integer"
      },
      "minItems": 1,
      "type": "array"
    },
    "site_id": {
      "description": "The environment row.",
      "minimum": 1,
      "type": "integer"
    },
    "test_id": {
      "description": "A passed test for this same move.",
      "minimum": 1,
      "type": "integer"
    },
    "version": {
      "description": "The version from corestack_nginx_rules_get.",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "version"
  ],
  "type": "object"
}
```

## Refusals

- `move_changes_behaviour`: the move would change which rule answers a path; `details.paths` lists them.
- `not_running`: the environment is stopped (a move is checked as the environment starts).
- `stale`: the rules changed since `version` was read.
- `nginx_invalid`, `nginx_test_failed`: the rules with the blocks moved in failed the policy or nginx -t; `details.diagnostics`.
- `nginx_rules_locked`: Corefinity staff hold this environment's nginx rules.
- `busy`: another change runs on the environment.
- `change_pending`: a change is queued, the last change is not confirmed yet, or the rules have an open drift.
- `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_nginx_corefinity_rules_move",
  "arguments": {
    "site_id": 4211,
    "version": 7
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_nginx_corefinity_rules_move with site_id 4211, version 7. (Move Corefinity rules into my rules.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites/{site}/nginx-rules/corefinity-rules/move](https://docs.corefinity.com/api/reference/site-settings/move-site-corefinity-nginx-rules.md)
- Guide: [Web server rules](https://docs.corefinity.com/guides/sites/site-settings/web-server-rules.md)
