---
id: gk-block-mcp-pattern-legacy-scan-limit
title: "Filter - gk/block-mcp/pattern/legacy-scan-limit"
sidebar_label: "gk/block-mcp/pattern/legacy-scan-limit"
tags:
  - "2.0.0"
---

# Filter: gk/block-mcp/pattern/legacy-scan-limit

Set how many synced patterns the legacy-block audit scans at once.

The plugin walks your synced patterns to flag any built from legacy-tier blocks, which helps you spot what needs modernizing. Because each pattern is parsed in memory, the scan is capped per pass. Raise the cap on a large library so the audit reaches every pattern, or lower it on a memory-constrained host to keep the scan light.

## Parameters

| Name | Type | Description |
|------|------|-------------|
| $limit | `int` | Maximum number of synced patterns to scan in one pass. Default 500. |

## Example

// Scan up to 2,000 synced patterns on a large site.

```php
add_filter( 'gk/block-mcp/pattern/legacy-scan-limit', function () {
    return 2000;
} );
```

### Since

- [2.0.0](../../since/2-0-0/)

### Source

Defined in `wordpress-plugin/gk-block-api/includes/class-block-inventory.php` at line 724

