---
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/seo/use-cases/analyze-core-web-vitals/copilot
---
# How to Analyze Core Web Vitals with Copilot

Copilot surfaces Core Web Vitals data right next to the code that affects them. When you see a poor LCP score, you can immediately refactor the component causing layout shifts or optimize image loading — all without leaving your editor. This direct connection between performance metrics and source code accelerates optimization cycles.

## Setup

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

## Steps

1. Add ToolRouter to Copilot MCP config
2. In Copilot Chat: "Check Core Web Vitals for mysite.com"
3. Review LCP, CLS, and INP results directly in your editor
4. Ask: "Show me code changes to fix the LCP issue"
5. Copilot can suggest specific code optimizations in your framework

## Example Prompt

```
Check Core Web Vitals for mysite.com and suggest React/Next.js code changes to fix any failing metrics.
```

## Tips

- Perfect for fixing vitals issues while you have the code open
- Copilot can generate lazy loading, image optimization, and font loading code
- Run checks against localhost to test improvements before deploying
