---
title: "corestack_varnish_vcl_get"
url: https://docs.corefinity.com/mcp/tools/corestack_varnish_vcl_get
type: tool
last_updated: 2026-11-13
feature: varnish
related:
  - https://docs.corefinity.com/api/reference/varnish/get-site-varnish-vcl.md
  - https://docs.corefinity.com/guides/sites/software-and-services/varnish.md
---
# corestack_varnish_vcl_get

**Show a site's custom Varnish VCL.** Shows a Magento 2 row's custom Varnish VCL: the three hooks, the version every change sends, the revision applied, the limits. Scope: read.

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

## When to use it

Read a Magento 2 row's custom Varnish VCL: the text of its three hooks (`recv`, `backend_response`, `deliver`), the `version` every change must send back (so two editors cannot overwrite each other), the revision and the revision Varnish is running (`applied_revision`, `applied_at`), whether Corefinity manages the VCL on this environment (`locked`), the Varnish version, the platform VCL it is inserted into and how much of the size limits it uses. Empty hooks mean the platform VCL alone.

The platform VCL is long and read-only; ask for its text with `include_platform: true` only when you need to see where a hook runs. Saved revisions are kept while Varnish is off, and apply when it is switched on.

## Inputs

- `site_id` (integer, ≥ 1, required): the row, a Magento 2 site or one of its environments.
- `include_platform` (boolean, default false): true adds the platform VCL's text under `platform.content`.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "include_platform": {
      "default": false,
      "description": "Add the platform VCL's text (long).",
      "type": "boolean"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id"
  ],
  "type": "object"
}
```

## Refusals

- `varnish_not_offered`: the row is not a Magento 2 site.
- 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_varnish_vcl_get",
  "arguments": {
    "site_id": 4211
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_varnish_vcl_get with site_id 4211. (Show a site's custom Varnish VCL.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [GET /api/corestack/sites/{site}/varnish/vcl](https://docs.corefinity.com/api/reference/varnish/get-site-varnish-vcl.md)
- Guide: [Varnish](https://docs.corefinity.com/guides/sites/software-and-services/varnish.md)
