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

**nginx rules policy.** What custom nginx rules may contain: per hook the allowed directives with their argument checks, the refused ones with the reason and where to go instead, the governed headers and the limits. Pass site_id for that environment's platform, nginx image and hooks, and the rate-limit presets its runtime supports. Scope: read.

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

## When to use it

What custom nginx rules may contain: per hook the allowed directives with their argument checks, the refused ones with the reason and where to go instead, the governed headers and the limits. Pass site_id for that environment's platform, nginx image and hooks.

With site_id, `rate_limit_presets` lists only the platform rate-limit presets (`limit_req zone=cf_rl_*`) that environment's runtime supports: none on a runtime without them, or before its one-time update. Without site_id it is the platform's whole list.

## Inputs

- `site_id` (integer, ≥ 1): An environment row: picks its platform, nginx image and hooks. Leave it out for the policy without a row.
- `platform` (string, one of `laravel`, `magento2`, `shopware`, `wordpress`): Without site_id: one platform's presets only.
- `image` (string, one of the policy's nginx images): Without site_id: the nginx image whose directives apply (default the runtime image).

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "image": {
      "description": "Without site_id: the nginx image whose directives apply (default the runtime image).",
      "enum": [
        "base/nginx:1.30.2-1",
        "nginx:1.30.6-r1"
      ],
      "type": "string"
    },
    "platform": {
      "description": "Without site_id: one platform's presets only.",
      "enum": [
        "laravel",
        "magento2",
        "shopware5",
        "wordpress"
      ],
      "type": "string"
    },
    "site_id": {
      "description": "An environment row: picks its platform, nginx image and hooks. Leave it out for the policy without a row.",
      "minimum": 1,
      "type": "integer"
    }
  },
  "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_nginx_policy_get",
  "arguments": {
    "site_id": 4211
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_nginx_policy_get with site_id 4211. (nginx rules policy.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [GET /api/corestack/nginx-rules/policy](https://docs.corefinity.com/api/reference/site-settings/get-nginx-policy.md)
- Guide: [Web server rules](https://docs.corefinity.com/guides/sites/site-settings/web-server-rules.md)
