---
title: "corestack_deployments_pipeline_template_reset"
url: https://docs.corefinity.com/mcp/tools/corestack_deployments_pipeline_template_reset
type: tool
last_updated: 2026-11-13
feature: deployment-pipeline
related:
  - https://docs.corefinity.com/api/reference/deployments/reset-site-deployment-pipeline-to-template.md
  - https://docs.corefinity.com/guides/sites/code-and-deployments/pipeline-stages.md
---
# corestack_deployments_pipeline_template_reset

**Reset a pipeline to its template.** Make stages of one environment's pipeline follow its deployment template again, writing the template's content now; or, with version, hold an earlier template version there instead. Scope: write. Also needs exec when the deployment pipeline gains a custom line.

- Scope: `write`
- Also needs `exec` when the environment gains custom lines it does not run now
- Confirmation: `confirm_production`
- Runs as a task: no

## When to use it

Make stages of one environment's pipeline follow its deployment template again: the template's content is written now and used from the next deployment, and the previous content stays in the version history. With `version` (a `version_ref` from `corestack_deployments_template_versions_list`) the stages hold that earlier version here instead, and later template saves do not reach them until a reset without `version`. Send the pipeline `revision` you read; production needs `confirm_production: true`. A command the pipeline does not run now also needs exec.

The same action in the public REST API, with the same checks, refusals and scope: `POST /api/corestack/sites/{site}/deployments/pipeline/{binding}/template-reset`, the binding being the environment's first.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `stages` (array of string, each one of `build`, `database`, `post_deploy`, `settings`, `all`, 1 to 4 items, required): The stages, or ["all"].
- `revision` (string, required): The pipeline revision you read.
- `version` ({template_id, revision} or {corefinity_version}): A version_ref from corestack_deployments_template_versions_list: hold that version here instead.
- `confirm_production` (boolean)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "confirm_production": {
      "type": "boolean"
    },
    "revision": {
      "description": "The pipeline revision you read.",
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "stages": {
      "description": "The stages, or [\"all\"].",
      "items": {
        "enum": [
          "build",
          "database",
          "post_deploy",
          "settings",
          "all"
        ],
        "type": "string"
      },
      "maxItems": 4,
      "minItems": 1,
      "type": "array"
    },
    "version": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "revision": {
              "minimum": 1,
              "type": "integer"
            },
            "template_id": {
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "template_id",
            "revision"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "corefinity_version": {
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "corefinity_version"
          ],
          "type": "object"
        }
      ],
      "description": "A version_ref from corestack_deployments_template_versions_list: hold that version here instead."
    }
  },
  "required": [
    "site_id",
    "stages",
    "revision"
  ],
  "type": "object"
}
```

## Refusals

- `forbidden`: the person's role lacks the Edit Environment Deployment Pipeline permission. The message names it and
  says an owner of the company can grant it in Roles; `details.permission` is `editEnvironmentDeploymentPipeline`.
  Nothing is changed.
- `stale`: the pipeline changed since you read it; read it again and resend.
- `confirm`: this is a production environment; send `confirm_production: true`.
- `version_unavailable`: that version is not one you can choose here.
- `pipeline_classic`: Corefinity still runs this pipeline in its classic form.
- `pipeline_locked`: Corefinity has locked this pipeline.
- `not_reached`: this environment does not follow a template yet.
- `node_too_old`: the template's stage needs a newer Node.js than this environment runs (Shopware's `shopware_storefront` and `shopware_administration` presets need Node.js 20).
- `preset_unavailable`: the template's preset is not available here, such as `shopware_cli` on an environment whose PHP image has no shopware-cli, or Shopware's `shopware_storefront` and `shopware_administration` presets on an environment without the runtime update ("This environment needs the runtime update before it can build with the Shopware storefront and administration presets."; `corestack_runtime_adopt`). Where the template's `shopware_auto` builds with shopware-cli, shopware-cli builds the storefront and administration itself and the two presets are left out.
- `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_deployments_pipeline_template_reset",
  "arguments": {
    "site_id": 4211,
    "stages": [
      "post_deploy"
    ],
    "revision": "r-8f2c",
    "confirm_production": true
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_deployments_pipeline_template_reset with site_id 4211, stages ["post_deploy"], revision r-8f2c. (Reset a pipeline to its template.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites/{site}/deployments/pipeline/{binding}/template-reset](https://docs.corefinity.com/api/reference/deployments/reset-site-deployment-pipeline-to-template.md)
- Guide: [Pipeline](https://docs.corefinity.com/guides/sites/code-and-deployments/pipeline-stages.md)
