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

**Show a site's Varnish.** Shows a Magento 2 row's Varnish: on or off, version and allowed versions, cache size, Magento's configuration state, purges left this hour, VCL revision. Read it before changing anything. Scope: read.

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

## When to use it

Read a Magento 2 row's Varnish full-page cache before changing anything: whether it is offered and on, the version in use and the versions this Magento allows, the cache size, whether Magento is configured for it, the purges left this hour and the VCL revision. Varnish runs in front of every Magento 2 site and environment on CoreStack and CoreCluster, on by default; access control (HTTP auth, the firewall, maintenance) always runs before the cache.

What the answer tells you:

- `offered`: false on a row Varnish cannot run on yet (for example after this site's platform update).
- `enabled` and `version`: on or off, and the Varnish version (a row switched off keeps its version for the next switch-on).
- `options[]`: every version with `allowed` (what `corestack_varnish_version_change` and `corestack_varnish_set` accept for this Magento), `recommended` (the version Adobe certifies for the installed Magento patch), `reason` (why a version is not allowed), `status` (`supported`, `lts`, `eol`, `prerelease`) and `eol_date`. An `eol` target needs `acknowledge: ["eol"]`.
- `memory_mib` and `storage_mib`: the cache's share of the site's memory and its page storage. It comes from the Redis full-page cache share (Magento's full-page cache moves to Varnish), never from PHP.
- `magento_config.state`: `varnish` (Magento sends its pages and purges to Varnish), `builtin` (Magento's own cache), `needs_repair` (repair with `corestack_function_run` and the function `magento_varnish_config`) or `pending_code` (configured at the first deployment).
- `purge`: `remaining_this_hour` of the ten an hour per site, `available_in` seconds when none is left, and the `last` purge (`origin` says who or what sent it: `panel`, `api`, `mcp`, `deployment`, `magento` and so on).
- `vcl`: the custom VCL revision and the one applied (`corestack_varnish_vcl_get` has the text); `pending`: a change waiting for the maintenance window.
- `site`: the row's id, domain and environment name.

The Varnish App (hit ratio, requests, memory and purges as charts, with a Flush cache sheet) opens from this tool in clients that show apps; `corestack_varnish_stats` has the same series as data.

## Inputs

- `site_id` (integer, ≥ 1, required): the row, a Magento 2 site or one of its environments.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "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_get",
  "arguments": {
    "site_id": 4211
  }
}
```

## Prompt

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

## The same task elsewhere

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