get_nav_structure Architecture

Get the navigation structure extracted from shared UI elements

Overview

Part of the Architecture Toolkit. Returns the navigation structure extracted from shared UI elements for a clone job — nav trees for main navigation, footer links, and sidebar menus. Each node in the tree includes a label, URL, sort order, and nested children, giving you the full link hierarchy needed to rebuild navigation components in your clone.

How It Works

  1. During shared element analysis, navigation elements (main nav, footer nav, sidebar nav) are identified and their link structures extracted.
  2. Links are organized into named nav groups: 'main', 'footer', or 'sidebar'.
  3. Parent-child relationships are preserved to represent nested dropdown menus and link hierarchies.
  4. This tool returns the nav tree for the job, optionally filtered to a specific nav group.

Input Parameters

ParameterTypeRequiredDescription
job_id string required Cloning job ID
nav_group string optional Filter by nav group: 'main', 'footer', or 'sidebar'

What You Get Back

Example Use Case

An agent calls get_nav_structure with nav_group='main' to get the full main navigation tree: Home, Products (with 3 dropdown children: All Products, Categories, On Sale), Blog, and Contact. It uses this to build the clone's navigation component with the exact same link hierarchy.

Tips

Run after a full comparison completes — nav structure is extracted as part of shared element analysis.
Use nav_group filter to focus on just the main nav, footer, or sidebar independently.
Children arrays represent dropdown menus and nested link groups — preserve nesting when building your component.
URLs in nav items are source site URLs — apply your clone domain substitution when wiring up links.
If nav_tree is empty, shared element detection may not have found navigation elements — check get_shared_page_elements for 'navigation' type elements.

Related Tools