bricks_scan_links

Phase 4.7IntermediateRead OnlyComplexity: 4/10
Scan all links site-wide — detect placeholders, broken, internal/external

Overview

Scans the entire site for links in Bricks pages, templates (header/footer), and navigation menus. Returns every link found with its source, classification (internal, external, placeholder, anchor, dynamic), whether it resolves, and auto-generated suggestions for fixing placeholder links.

This is a critical Phase 4.7 tool — the #5 quality issue is stale placeholder links left after page creation. Always run this after creating pages to find and fix # links in menus, headers, and footers.

Key Features

Site-wide scanning
Scans all pages, templates (header/footer), and navigation menus
Link classification
Classifies each link as internal, external, placeholder, anchor, or dynamic
Auto suggestions
Matches placeholder button labels to real page URLs and generates fix suggestions
Filter modes
Filter by: all, placeholder, broken, internal, external

When to Use

Phase 4.7 (Link Reconciliation) — MANDATORY after creating all pages
After creating templates with placeholder links
After any page slug change or page deletion
To find broken internal links across the site
Prerequisites
Pages should already be created (Phase 4 complete)
Templates should already exist (Phase 3 complete)

When NOT to Use

During page creation — wait until all pages exist first
To update links — use bricks_update_links after scanning

Parameters

4 Total Parameters4 Optional
filterenumoptional
Filter results by link type
Default: all Values: all, placeholder, broken, internal, external
page_idsarrayoptional
Scan only these page IDs (omit for all pages)
include_menusbooleanoptional
Include navigation menu links
Default: true
include_templatesbooleanoptional
Include header/footer template links
Default: true

Code Examples

Scan for placeholder links

Find all # and dummy links that need updating after page creation

JSON
{
    "filter": "placeholder"
}
Response
{"summary": {"placeholder": 8}, "links": [...], "suggestions": [{"element_id": "abc", "label": "Contact", "suggested_url": "/contact"}]}

Common Mistakes

Not scanning links after creating pages
ALWAYS run bricks_scan_links(filter: "placeholder") after Phase 4 page creation, then bricks_update_links to fix stale # links
Leaving # links in menus and templates
Menus default custom URLs to #. After all pages exist, scan and replace with real URLs

Tips & Warnings

Tips & Warnings

This is the #5 quality issue: stale placeholder links. Always run after creating pages.

  • Use filter: "placeholder" to focus on dummy links
  • Use filter: "broken" to find internal links that don’t resolve
  • The suggestions array auto-matches button text to page URLs
  • Follow up with bricks_update_links to batch-fix issues

Return Values

FieldTypeDescription
summaryobjectCounts by type: {placeholder: 8, broken: 2, internal: 15, external: 5}
linksarrayAll links found with source info, classification, and URL
suggestionsarrayAuto-generated fix suggestions matching button labels to real page URLs

Related Tools

Technical Details

Tool ID
bricks_scan_links
API Endpoint
/bricks-mcp/v1/links/scan
HTTP Method
POST
Namespace
wordpress-site
Source File
analysis/links.ts
Version
1.0
Min Bricks Version
1.9
Requires Auth
Yes

Changelog

v1.0
Initial release
20250101