generatePreviewScript
Generates a preview script for Chrome DevTools MCP that injects specified modifications into a live page, so you can visually verify changes before setting up an Adobe Target activity.
Instructions
Generate a preview script for Chrome DevTools MCP to inject modifications into a live page.
WORKFLOW REQUIREMENTS FOR LLM:
Before calling this tool, explain to the user what modifications you're about to preview
Show them the specific selectors and changes (e.g., "I'll change the button .cta-primary to have a blue background")
Call this tool to get the preview script
Use Chrome DevTools MCP 'navigate_to' to load the page (if not already open) IMPORTANT: use a timeout of 30000 ms to ensure the page fully loads
Use Chrome DevTools MCP 'evaluate_script' with the provided script to inject the modifications
Ask the user to review the changes visually in their browser
Wait for user approval before creating the activity
This approach uses Chrome DevTools MCP and execute_script for live preview
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL where the preview should be shown | |
| description | Yes | Description of what the modifications do | |
| modifications | Yes | JavaScript code that makes the modifications (CSS changes, text updates, etc.) |