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

**Deployment pipeline.** A deployment pipeline: its build, database and post-deploy stages (lines redacted, each with its check), settings, placement, presets, the environment's deployment options and the revision to send with a change. With version_id, one saved version compared with the current pipeline or another version. Scope: read.

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

## When to use it

Read a deployment pipeline before changing it: its build, database and post-deploy stages (every line redacted, with its check verdict and badges), its settings, placement, the presets on offer, the environment's deployment options and the `revision` every change must send. Pass `binding_id` for another binding of the environment. With `version_id` (from `corestack_deployments_pipeline_versions_list`) it reads that saved version instead, with what differs per stage and setting from `compare_to`: the current pipeline, or another version. Never a variable value or a secret.

A pipeline comes in one of two layouts, named by `stage_model`:

- `three_stage`: `stages` holds the build, database and post-deploy lines you can change, and `classic` is null.
- a classic pipeline (`stage_model` null): `stages` and `settings` are null and changes are refused with `pipeline_classic`. `classic` lists what it actually runs: each block in the order the deployment runs it (on a version 3 site first `build_server`, the platform's build commands run as one `Building` step on the build server; then `build`; on a version 2 Kubernetes environment `database`, between `maintenance_on` and `maintenance_off` when maintenance mode brackets it; then `post_build`), each line under the name its step has on the deployment page (`Build command 2`), with `source` `custom` for the environment's own lines, `shared` for the platform's shared pipeline it inherits, or `platform` for the build server block. Credentials are redacted; a comment line is listed with the line it precedes. `runs` is false when the pipeline is refused at deploy and runs nothing.

On a version 2 environment a classic pipeline's `build` lines run while the live site keeps serving visitors, against its database. Database changes that need maintenance mode belong in the database commands, with maintenance mode switched on (the `database` block between `maintenance_on` and `maintenance_off`). The shared Magento 2 pipeline switches maintenance mode on in its build for the `setup:upgrade` line alone.

A classic pipeline's answer includes:

```json
{
  "stage_model": null,
  "stages": null,
  "classic": {
    "pipeline_version": 3,
    "runs": true,
    "sections": [
      {"key": "build", "label": "Build command", "source": "shared", "lines": [
        {"label": "Build command 1", "command": "composer install --no-interaction --no-dev --optimize-autoloader", "comments": []}
      ]},
      {"key": "post_build", "label": "Post build command", "source": "custom", "lines": [
        {"label": "Post build command 1", "command": "php artisan migrate --force", "comments": ["# schema first"]}
      ]}
    ]
  }
}
```

The same action in the public REST API, with the same checks, refusals and scope: `GET /api/corestack/sites/{site}/deployments/pipeline` (`binding_id`), and with `version_id` `GET /api/corestack/sites/{site}/deployments/pipeline/{binding}/versions/{version}` (`compare_to`).

## Inputs

- `site_id` (integer, ≥ 1, required)
- `binding_id` (integer, ≥ 1): Default: the environment's default binding.
- `version_id` (integer, ≥ 1): A version from corestack_deployments_pipeline_versions_list: read it instead of the current pipeline.
- `compare_to` (`current` or an integer ≥ 1): With version_id: current (the default) or another version_id.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "binding_id": {
      "description": "Default: the environment's default binding.",
      "minimum": 1,
      "type": "integer"
    },
    "compare_to": {
      "anyOf": [
        {
          "enum": [
            "current"
          ],
          "type": "string"
        },
        {
          "minimum": 1,
          "type": "integer"
        }
      ],
      "description": "With version_id: current (the default) or another version_id."
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "version_id": {
      "description": "A version from corestack_deployments_pipeline_versions_list: read it instead of the current pipeline.",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id"
  ],
  "type": "object"
}
```

## Refusals

- 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_get",
  "arguments": {
    "site_id": 4211,
    "version_id": 381,
    "compare_to": "current"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_deployments_pipeline_get with site_id 4211, version_id 381, compare_to current. (Deployment pipeline.) Tell me what it returned.
```

## The same task elsewhere

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