---
title: ToolRouter — Agent Use Case Guide
description: Step-by-step guide for completing a task with a specific AI agent using ToolRouter.
url: https://toolrouter.com/tools/web-scraper/use-cases/map-website-structure/copilot
---
# How to Map Website Structure with Copilot

Copilot maps website structure from within your IDE, which is valuable when reverse-engineering a site for migration, building a competing product, or understanding a client's current architecture. See the URL structure alongside your routing code for a complete picture of how a site is organized.

## Setup

{"mcpServers":{"toolrouter":{"command":"npx","args":["-y","toolrouter-mcp"]}}}

## Steps

1. Add ToolRouter to your Copilot MCP configuration
2. Ask Copilot: "Map the site structure of example.com"
3. Review the URL hierarchy and page structure in your editor
4. Ask: "Generate a redirect map from this old structure to our new URL scheme"
5. Use the map directly in your migration planning

## Example Prompt

```
Map example.com site structure and generate a redirect map from the old URLs to our new /docs/* URL pattern.
```

## Tips

- Essential for planning site migrations with zero broken links
- Copilot can generate nginx or Next.js redirect configs from the site map
- Compare discovered URLs against your routing config to find gaps
