| name | closing_conditions_identifier |
| description | Extract all Conditions to Closing from a merger agreement using Playwright browser automation. Use when asked to identify closing conditions, conditions precedent, or obligations to close from merger agreements. Requires direct URL to contract document (no landing pages). Uses ONLY Playwright tools (no fetch/curl). Handles PDF and HTML documents, creates comprehensive audit trails with screenshots and CSV outputs. Includes granular R&W categorization and cross-referencing. (project) |
Goal
Extract every closing condition (conditions precedent to consummation / obligations to close) from a merger agreement, returning verbatim contract text with an audit trail of screenshots and CSV results for auditability.
IMPORTANT: This skill performs TWO levels of analysis:
- Level 1 - Condition Extraction: Extract all closing conditions verbatim with section references
- Level 2 - R&W Categorization: For bringdown conditions, cross-reference the cited sections to identify the specific R&W types (Organization, Capitalization, Authority, etc.)
⚠️ CRITICAL: Visual Navigation Only - No Full Document Ingestion
DO NOT attempt to ingest or extract the full contract text. These merger agreements are extremely large (often 100+ pages, 50,000+ words) and will overwhelm context if you try to process them at once.
Instead, you MUST:
- Navigate visually using Playwright scrolling and screenshots
- Take frequent screenshots to see and read content - use the Read tool to view screenshots
- Scroll incrementally using mouse wheel via
browser_run_code
- Read text from screenshots to extract verbatim content
- Close and reopen browser to navigate to specific pages (see Page Navigation section)
- Never use
browser_snapshot or document.body.innerText to capture full text
Inputs
| Parameter | Type | Description |
|---|
contract_url | string | Direct link to the full merger agreement document (HTML or PDF). The URL must point directly to the contract content - no landing pages or index pages. |
question | string | The closing-conditions prompt, e.g., "Identify all conditions to closing" or a narrower condition-related query |
deal_name | string | (Optional) Short identifier for the deal, e.g., "AcquirerCo_TargetCo_2026". If not provided, derive from contract parties. |
Constraints
- Playwright tools only: Use ONLY Playwright MCP browser tools for all interactions. Do NOT use fetch, curl, wget, WebFetch, or any HTTP request tools.
- Direct contract URL: The provided URL must point directly to the full contract document. No navigation from landing pages or index pages is required or supported.
- NEVER ingest the full document: These contracts are extremely large (often 100+ pages). DO NOT attempt to extract or read the full document text at once. This will overwhelm context and fail. Instead, navigate visually using Playwright scrolling and screenshots.
- Navigate with screenshots: Use screenshots as your primary means of understanding where you are in the document. Take screenshots frequently, then use the Read tool to view them and understand your position.
- Mouse wheel scrolling: Use
browser_run_code with page.mouse.wheel() for reliable scrolling in PDF viewers. Keyboard shortcuts like PageDown often don't work in embedded PDF viewers.
- Close/reopen for page navigation: To navigate to a specific page in a PDF, close the browser and reopen with
url#page=X. Simply refreshing or using URL fragments without closing doesn't work reliably.
- Completeness over speed: Prioritize capturing ALL closing conditions, even if it takes longer
- Verbatim extraction only: Never paraphrase or summarize the contract text
- Evidence required: Every extracted condition MUST have screenshot evidence
- Auditability: All actions must be reproducible from the audit trail; CSV format enables easy review and comparison
- Cross-reference R&W sections: For bringdown conditions, navigate to and read the referenced representation sections to categorize them
⚠️ CRITICAL: PDF Page Navigation
The #page=X URL fragment does NOT work with simple page refresh. To navigate to a specific page in a PDF:
Correct Approach: Close and Reopen Browser
1. Close the browser: mcp__playwright__browser_close
2. Navigate to the URL with page fragment: mcp__playwright__browser_navigate with url="https://example.com/contract.pdf#page=68"
This is the ONLY reliable way to jump to a specific page in a PDF viewer.
Why Other Methods Fail
- Simply navigating to
url#page=X while browser is open doesn't scroll to that page
- Using keyboard shortcuts (PageDown/PageUp) is unreliable in PDF viewers
- JavaScript
window.scrollTo() doesn't work in PDF embed viewers
Recommended Workflow for Page Navigation
- First, scroll through the Table of Contents to identify which page has the Conditions section
- Note the page number from the TOC (e.g., "Article VI CONDITIONS TO THE MERGER 68")
- Close the browser:
mcp__playwright__browser_close
- Reopen with page fragment:
mcp__playwright__browser_navigate to url#page=68
- Take a screenshot and verify you're on the correct page
Guardrails
1. Definition: What Counts as a Closing Condition
Count a passage as a closing condition if it is framed as a requirement that must be satisfied (or waived) to consummate the transaction or to trigger a party's obligation to close, typically under headings like:
- "Conditions to Closing"
- "Conditions Precedent"
- "Conditions to the Obligations of [Parent/Buyer/Merger Sub]"
- "Conditions to the Obligations of [Company/Target]"
- "Conditions to Each Party's Obligations"
- "Conditions to the Offer" (tender offer structures, often an annex)
- "Conditions to the Merger"
Linguistic signals to look for:
- "subject to the satisfaction or waiver..."
- "shall not be obligated to consummate... unless..."
- "conditions precedent"
- "provided that... at or prior to the Closing..."
Do NOT treat these as closing conditions unless explicitly stated:
- "Closing mechanics" (date/time/location, funds flow instructions)
- Deliverables listed without "condition" framing (unless clearly drafted as a condition precedent)
- Post-closing covenants and survival clauses
When in doubt: Include it but label as confidence: low and capture screenshots.
2. Screenshot Evidence Requirements
For EVERY extracted condition:
- Context screenshot: Shows the heading of the conditions section and the full clause block
- Zoom screenshot: Shows the condition text clearly readable with enough surrounding content to prove authenticity
Mandatory screenshots at minimum:
- The contract document loaded (first view)
- Table of Contents showing the Conditions article location
- Each time a "Conditions..." heading is located
- For every extracted condition: context + zoom screenshots
- NEW: For bringdown conditions, screenshot the referenced R&W sections
3. Verbatim Text Extraction Rules
- Read text from screenshots - use the Read tool to view screenshots and transcribe the text you see
- Preserve: capitalization of defined terms, punctuation, internal numbering and lettering, line breaks where they reflect clause formatting
- Never summarize inside
verbatim_text
- If text appears corrupted: screenshot the displayed text, try alternate extraction, keep best available verbatim and set
confidence: low
4. Interstitial Handling
If any interstitial appears (cookie banners, "Accept", file download prompts), screenshot it BEFORE interacting.
Standard R&W Categories for Classification
When analyzing bringdown conditions, classify each referenced section into these standard M&A R&W categories:
Target/Company R&W Categories
| Category | Common Section Topics | Typical Section Numbers |
|---|
organization | Organization, Standing and Power, Subsidiaries | 2.1 |
capitalization | Capital Structure, Authorized Shares, Outstanding Securities | 2.2 |
capitalization_other | Options, Warrants, Convertible Securities | 2.2(b), 2.2(c) |
authority | Authority, Power to Execute Agreement | 2.3(a) |
approval | Board Approval, Stockholder Vote Required | 2.3(a) |
enforceability | Valid and Binding Obligation, Enforceable | 2.3(a) |
no_conflict | Non-contravention, No Violations, No Defaults | 2.3(b) |
consents | Required Consents, Governmental Filings | 2.3(c) |
sec_filings | SEC Reports, Financial Statements, Internal Controls | 2.4 |
absence_of_changes | No Material Adverse Effect, Absence of Certain Changes | 2.5 |
litigation | Legal Proceedings, Claims, Orders | 2.6 |
compliance_with_laws | Compliance with Laws, Governmental Permits | 2.7 |
title_to_assets | Title to Assets, Real Property | 2.8 |
intellectual_property | IP, Patents, Trademarks, Trade Secrets | 2.9 |
environmental | Environmental Matters, Hazardous Materials | 2.10 |
taxes | Tax Returns, Tax Liabilities, Tax Compliance | 2.11 |
employee_benefits | Employee Benefit Plans, ERISA Compliance | 2.12 |
labor_matters | Labor Relations, Employment Agreements | 2.13 |
insurance | Insurance Policies, Coverage | 2.14 |
brokers_fee | Brokers' and Advisors' Fees | 2.15 |
material_contracts | Material Contracts, Contract Compliance | 2.16 |
related_party | Interested Party Transactions, Affiliate Transactions | 2.17 |
opinion_of_financial_advisor | Fairness Opinion | 2.19 |
anti_takeover | Takeover Statutes, Rights Agreement | 2.18 |
rights_agreement | Stockholder Rights Plan, Poison Pill | 2.18 |
information_supplied | Proxy Statement, Information Accuracy | 2.20 |
Parent/Buyer R&W Categories
| Category | Common Section Topics |
|---|
organization | Organization of Parent and Sub |
authority | Authority to Execute |
no_conflict | Non-contravention |
consents | Required Filings and Consents |
financing | Availability of Funds, Financing Commitments |
litigation | Absence of Litigation |
information_supplied | Proxy Statement Information |
stock_ownership | Ownership of Target Stock |
solvency | Solvency |
Output Directory Structure
All outputs are saved under .playwright-mcp/m_and_a_contract_task/ with a logical hierarchy:
.playwright-mcp/m_and_a_contract_task/
<deal_name>/
<run_timestamp>/
# Input tracking
input/
contract_url.txt
question.txt
run_metadata.json
# Screenshots organized by purpose (PRIMARY source of truth)
screenshots/
01_contract_overview/
001_contract_loaded.png
002_first_page.png
02_table_of_contents/
toc_overview.png
toc_conditions_section.png
03_condition_headings/
H001_mutual_conditions_heading.png
H002_buyer_conditions_heading.png
H003_target_conditions_heading.png
...
04_navigation/
nav_001_scroll_to_conditions.png
nav_002_section_7_start.png
nav_003_section_7_continued.png
...
05_conditions_evidence/
CC001_context.png
CC001_zoom.png
CC002_context.png
CC002_zoom.png
...
06_rw_cross_reference/
RW_section_2.1_organization.png
RW_section_2.2_capitalization.png
RW_section_2.3_authority.png
...
# Results (CSV for auditability)
results/
closing_conditions.csv
closing_conditions_summary.md
rw_categorization.csv # NEW: Granular R&W breakdown
rw_analysis_summary.md # NEW: R&W analysis report
audit_manifest.csv
extraction_log.csv
Naming conventions:
<deal_name>: Short deal identifier (e.g., Microsoft_Activision_2023, Broadcom_VMware_2022)
<run_timestamp>: Format YYYYMMDD_HHMMSS (e.g., 20260102_143052)
- Screenshots use sequential numbering within each folder for clear ordering
- Navigation screenshots capture the scroll journey through the document
Required Output
A) Primary Results: results/closing_conditions.csv
CSV file with the following columns (pipe | delimiter for readability with long text):
condition_id|party_scope|section_ref|heading|page_hint|verbatim_text|context_screenshot|zoom_screenshot|source_url|confidence|notes|extracted_at
CC-001|mutual|Section 6.1(a)|Conditions to Each Party's Obligations|68|"The representations and warranties of the Company..."|screenshots/05_conditions_evidence/CC001_context.png|screenshots/05_conditions_evidence/CC001_zoom.png|https://...|high|bringdown condition|2026-01-02T14:30:52Z
CC-002|buyer_parent|Section 6.3(a)|Conditions to Obligations of Parent|69|"The Company shall have performed..."|screenshots/05_conditions_evidence/CC002_context.png|screenshots/05_conditions_evidence/CC002_zoom.png|https://...|high|covenant compliance|2026-01-02T14:31:15Z
Column definitions:
| Column | Description |
|---|
condition_id | Unique ID (CC-001, CC-002, etc.) |
party_scope | One of: mutual, buyer_parent, target_company, offer_conditions, unknown |
section_ref | Contract section reference (e.g., "Section 6.2(f)", "Article VI") |
heading | Nearest heading text |
page_hint | Page number(s) from PDF viewer |
verbatim_text | Exact contract text (quoted to handle commas/newlines) |
context_screenshot | Relative path to context screenshot |
zoom_screenshot | Relative path to zoom screenshot |
source_url | URL at time of capture |
confidence | high, medium, or low |
notes | Brief factual notes about the condition type |
extracted_at | ISO timestamp of extraction |
B) NEW: R&W Categorization: results/rw_categorization.csv
For each bringdown condition, list every R&W type referenced with inclusion status:
condition_id|party_scope|rw_section_ref|rw_category|rw_type_description|included|fundamental|materiality_scrape|bringdown_standard|evidence_screenshot|notes
CC-006|buyer_parent|Section 2.1(a)|organization|Organization, Standing and Power|yes|yes|no|all_material_respects|screenshots/06_rw_cross_reference/RW_section_2.1.png|First sentence only
CC-006|buyer_parent|Section 2.2(a)|capitalization|Capital Structure|yes|yes|no|all_material_respects|screenshots/06_rw_cross_reference/RW_section_2.2.png|First sentence only
CC-006|buyer_parent|Section 2.3|authority|Authority; Non-contravention|yes|yes|no|all_material_respects|screenshots/06_rw_cross_reference/RW_section_2.3.png|Full section
CC-006|buyer_parent|Section 2.3(b)|no_conflict|Non-contravention|yes|no|yes|mae_except|screenshots/06_rw_cross_reference/RW_section_2.3b.png|With MAE scrape
CC-006|buyer_parent|Section 2.3(c)|consents|Required Consents|yes|no|yes|mae_except|screenshots/06_rw_cross_reference/RW_section_2.3c.png|With MAE scrape
CC-006|buyer_parent|Section 2.15|brokers_fee|Brokers' and Advisors' Fees|yes|yes|no|all_material_respects|screenshots/06_rw_cross_reference/RW_section_2.15.png|
CC-006|buyer_parent|Section 2.19|opinion_of_financial_advisor|Fairness Opinion|yes|yes|no|all_material_respects|screenshots/06_rw_cross_reference/RW_section_2.19.png|
CC-006|buyer_parent|Section 2.20|information_supplied|Information in Proxy Statement|yes|yes|no|all_material_respects|screenshots/06_rw_cross_reference/RW_section_2.20.png|
CC-006|buyer_parent|N/A|rights_agreement|Stockholder Rights Plan|no|N/A|N/A|N/A||Not referenced in bringdown
CC-006|buyer_parent|N/A|anti_takeover|Takeover Statutes|no|N/A|N/A|N/A||Not referenced in bringdown
Column definitions:
| Column | Description |
|---|
condition_id | Links to closing_conditions.csv |
party_scope | Which party's R&Ws (target or parent) |
rw_section_ref | Section number in the agreement |
rw_category | Standard category from the taxonomy |
rw_type_description | Section heading/description |
included | yes or no - Is this R&W type in the bringdown? |
fundamental | yes or no - Is it a "fundamental" rep with higher standard? |
materiality_scrape | yes or no - Are materiality qualifiers disregarded? |
bringdown_standard | true_and_correct, all_material_respects, mae_except |
evidence_screenshot | Path to screenshot of the R&W section |
notes | Additional context |
C) NEW: R&W Analysis Summary: results/rw_analysis_summary.md
# R&W Bringdown Analysis Report
**Deal**: <deal_name>
**Contract URL**: <url>
**Extracted**: <timestamp>
---
## Target Company R&W Bringdown Analysis (Section 6.3(a))
### Fundamental Representations (All Material Respects Standard)
These representations must be true and correct in all material respects:
| R&W Category | Section | Included | Notes |
|--------------|---------|----------|-------|
| Organization | 2.1(a) | Yes | First sentence only |
| Capitalization | 2.2(a) | Yes | First sentence only |
| Authority | 2.3 | Yes | Full section |
| Brokers' Fee | 2.15 | Yes | |
| Opinion of Financial Advisor | 2.19 | Yes | |
| Information Supplied | 2.20 | Yes | |
### Non-Fundamental Representations (MAE-Except Standard with Materiality Scrape)
These representations are subject to materiality scrape and MAE-except standard:
| R&W Category | Section | Included | Materiality Scrape |
|--------------|---------|----------|-------------------|
| No-Conflict | 2.3(b) | Yes | Yes |
| Consents | 2.3(c) | Yes | Yes |
### R&W Categories NOT Included in Bringdown
| R&W Category | Reason/Notes |
|--------------|--------------|
| Rights Agreement | Not a closing condition |
| Anti-Takeover | Not referenced |
| Environmental | Not referenced |
| ... | ... |
---
## Parent R&W Bringdown Analysis (Section 6.2(a))
[Similar structure for Parent R&Ws]
---
## Summary Statistics
| Metric | Target R&Ws | Parent R&Ws |
|--------|-------------|-------------|
| Total R&W Categories | 25 | 10 |
| Included in Bringdown | 8 | 4 |
| Fundamental Reps | 6 | 3 |
| With Materiality Scrape | 2 | 1 |
| NOT Included | 17 | 6 |
---
## Confirmatory Checklist
For each standard R&W category, confirm presence/absence:
### Target R&Ws
- [x] Organization - YES (Section 2.1(a))
- [x] Capitalization - YES (Section 2.2(a))
- [x] Authority - YES (Section 2.3)
- [x] Approval - YES (Section 2.3)
- [x] Enforceability - YES (Section 2.3)
- [x] No-Conflict - YES (Section 2.3(b))
- [x] Brokers' Fee - YES (Section 2.15)
- [x] Opinion of Financial Advisor - YES (Section 2.19)
- [ ] Rights Agreement - NO
- [ ] Anti-Takeover - NO
- [ ] SEC Filings - NO
- [ ] Absence of Changes - NO
...
D) Human-Readable Summary: results/closing_conditions_summary.md
# Closing Conditions Extraction Report
**Deal**: <deal_name>
**Contract URL**: <url>
**Extracted**: <timestamp>
**Question**: <question>
---
## Summary Statistics
- **Total Conditions Found**: <count>
- **Mutual Conditions**: <count>
- **Buyer/Parent Conditions**: <count>
- **Target/Company Conditions**: <count>
- **Offer Conditions**: <count>
- **High Confidence**: <count>
- **Medium Confidence**: <count>
- **Low Confidence**: <count>
---
## Conditions Overview
| ID | Section | Party Scope | Condition Type | Confidence |
|----|---------|-------------|----------------|------------|
| CC-001 | Section 6.1(a) | mutual | Regulatory approval | high |
| CC-002 | Section 6.3(a) | buyer_parent | Rep & warranty bringdown | high |
| ... | ... | ... | ... | ... |
---
## Evidence Index
| ID | Context Screenshot | Zoom Screenshot |
|----|-------------------|-----------------|
| CC-001 | [View](screenshots/05_conditions_evidence/CC001_context.png) | [View](screenshots/05_conditions_evidence/CC001_zoom.png) |
| CC-002 | [View](screenshots/05_conditions_evidence/CC002_context.png) | [View](screenshots/05_conditions_evidence/CC002_zoom.png) |
---
## Detailed Results
See `closing_conditions.csv` for full verbatim text and all metadata.
See `rw_categorization.csv` for granular R&W breakdown.
See `rw_analysis_summary.md` for R&W analysis report.
E) Audit Manifest: results/audit_manifest.csv
Maps each artifact to its hash for integrity verification:
artifact_type|artifact_id|file_path|sha256_hash|captured_at
condition_text|CC-001|results/closing_conditions.csv|<hash of verbatim text>|2026-01-02T14:30:52Z
screenshot|CC-001_context|screenshots/05_conditions_evidence/CC001_context.png|<file hash>|2026-01-02T14:30:50Z
screenshot|CC-001_zoom|screenshots/05_conditions_evidence/CC001_zoom.png|<file hash>|2026-01-02T14:30:51Z
rw_analysis|CC-006_rw|results/rw_categorization.csv||2026-01-02T14:35:00Z
F) Extraction Log: results/extraction_log.csv
Logs all actions taken during extraction for full auditability:
timestamp|action|target|result|notes
2026-01-02T14:30:00Z|navigate|https://example.com/contract.pdf|success|Contract document loaded
2026-01-02T14:30:05Z|screenshot|001_contract_loaded.png|success|Initial contract view
2026-01-02T14:30:10Z|scroll|mouse_wheel_down|success|Scrolling through TOC
2026-01-02T14:30:15Z|screenshot|toc_conditions_section.png|success|Found Article VI on page 68
2026-01-02T14:30:20Z|close_browser||success|Preparing to navigate to page 68
2026-01-02T14:30:25Z|navigate|url#page=68|success|Reopened browser at page 68
2026-01-02T14:35:00Z|cross_reference|Section 2.1|success|Read Organization R&W
2026-01-02T14:35:05Z|categorize|organization|success|Categorized as fundamental rep
Workflow
Step 0: Initialize Run
- Determine
deal_name:
- Use provided value, OR
- Derive from contract parties once contract is visible (e.g., "AcquirerCo_TargetCo_YYYY")
- Generate
run_timestamp: YYYYMMDD_HHMMSS
- Create folder structure:
.playwright-mcp/m_and_a_contract_task/<deal_name>/<run_timestamp>/
- Create all subfolders:
input/, screenshots/01_contract_overview/, screenshots/02_table_of_contents/, screenshots/03_condition_headings/, screenshots/04_navigation/, screenshots/05_conditions_evidence/, screenshots/06_rw_cross_reference/, results/
- Write inputs to
input/ folder
- Initialize
results/extraction_log.csv with headers
Step 1: Open the Contract URL
- Navigate to
contract_url using mcp__playwright__browser_navigate
- Log action to extraction_log.csv
- Take screenshot:
screenshots/01_contract_overview/001_contract_loaded.png
- Use the Read tool to view the screenshot and verify the contract is loaded
- Note document type (PDF viewer or HTML) and total page count if visible
Step 2: Find Table of Contents and Locate Conditions Section
CRITICAL: First, find the Table of Contents to identify which page contains the Conditions article.
- Take a screenshot of the current view
- Use the Read tool to view the screenshot and look for Table of Contents
- Scroll through TOC using mouse wheel:
async (page) => {
await page.mouse.click(800, 500);
await page.mouse.wheel(0, 2000);
}
- Take screenshots as you scroll through TOC
- Use the Read tool to view each screenshot and look for:
- "Article VI CONDITIONS TO THE MERGER" or similar
- "Conditions to Closing"
- "Conditions Precedent"
- Note the page number where the Conditions article starts (e.g., "68")
- ALSO note the page numbers for Article II (Company Representations) - you'll need this for cross-referencing
- Screenshot the TOC showing the Conditions section:
toc_conditions_section.png
Step 3: Navigate to Conditions Section
CRITICAL: Use close/reopen method to navigate to specific page.
- Close the browser:
mcp__playwright__browser_close
- Reopen at the target page:
mcp__playwright__browser_navigate with url#page=XX
- Take a screenshot to verify you're on the correct page
- Use the Read tool to view the screenshot and confirm you see the Conditions heading
Step 4: Extract Closing Conditions
Once at the Conditions section:
- Take a screenshot showing the Article heading:
H001_conditions_heading.png
- Scroll through the section using mouse wheel, taking screenshots every 1-2 screens
- Use the Read tool to view each screenshot and identify individual conditions
- For each condition found:
- Assign
condition_id (CC-001, CC-002, etc.)
- Determine
party_scope from the section heading
- Note
section_ref and page_hint
- Transcribe
verbatim_text by reading from the screenshot
- Take evidence screenshots (context + zoom)
- For bringdown conditions: Note ALL section references (e.g., "Section 2.1(a), Section 2.2(a), Section 2.3...")
Typical Conditions Structure:
- Section 6.1: Conditions to Each Party's Obligations (mutual)
- Section 6.2: Conditions to Company's Obligations (target_company)
- Section 6.3: Conditions to Parent's Obligations (buyer_parent)
Step 5: Scroll and Extract All Conditions
Continue scrolling until you reach the next Article (usually "TERMINATION"):
async (page) => {
await page.mouse.wheel(0, 1500);
await page.waitForTimeout(300);
}
After each scroll:
- Take a screenshot
- Use the Read tool to view it
- Check the page number in the PDF viewer header
- Extract any conditions visible
- Stop when you see "ARTICLE VII" or "TERMINATION"
Step 6: Cross-Reference R&W Sections (NEW - CRITICAL)
For each bringdown condition, navigate to the referenced R&W sections to identify their types:
-
Parse the bringdown condition to extract all section references:
- Example: "Section 2.1(a), Section 2.2(a), Section 2.3, Section 2.15, Section 2.19 and Section 2.20"
-
Navigate to Article II (Company Representations) or Article III (Parent Representations):
- Close browser:
mcp__playwright__browser_close
- Navigate to TOC-noted page for representations
- Use mouse wheel to scroll to each referenced section
-
For each referenced section:
- Take a screenshot:
screenshots/06_rw_cross_reference/RW_section_X.X.png
- Use the Read tool to view the screenshot
- Identify the section heading (e.g., "2.1. Organization, Standing and Power")
- Categorize using the standard R&W taxonomy
- Note if it's the "first sentence" only or full section
-
Also check for EXCLUDED R&W categories:
- Look at what standard categories are NOT mentioned in the bringdown
- Common exclusions: Rights Agreement, Anti-Takeover, SEC Filings, Absence of Changes
- Document these as
included: no in the categorization
-
Identify the bringdown standard for each R&W:
- "true and correct in all material respects" →
all_material_respects (usually fundamental)
- "disregarding all qualifications... relating to materiality" →
materiality_scrape
- "except where... would not have a Material Adverse Effect" →
mae_except
Step 7: Generate Outputs
- Write
results/closing_conditions.csv with all extracted conditions
- Write
results/rw_categorization.csv with granular R&W breakdown (NEW)
- Write
results/rw_analysis_summary.md with R&W analysis report (NEW)
- Write
results/closing_conditions_summary.md with statistics and overview
- Generate hashes and write
results/audit_manifest.csv
- Finalize
results/extraction_log.csv
- Close the browser using
mcp__playwright__browser_close
Browser Interaction Guidelines
CRITICAL: Use ONLY Playwright MCP tools for all browser interactions. Do NOT use fetch, curl, wget, or any HTTP request tools.
CRITICAL: Do NOT try to ingest or extract the full document. Navigate visually using screenshots and scrolling.
Allowed Tools
mcp__playwright__browser_navigate - Navigate to URLs (use with #page=X for PDF page navigation)
mcp__playwright__browser_take_screenshot - Take visual screenshots
mcp__playwright__browser_run_code - Execute JavaScript for mouse wheel scrolling
mcp__playwright__browser_click - Click elements (links, buttons, ToC entries)
mcp__playwright__browser_type - Type text (for search dialogs)
mcp__playwright__browser_close - IMPORTANT: Close browser before navigating to new page
- Read tool - View screenshots to understand content and position
DO NOT Use
mcp__playwright__browser_snapshot - Do NOT use for full document capture
mcp__playwright__browser_run_code with document.body.innerText - Do NOT extract full text
mcp__playwright__browser_press_key with PageDown/PageUp - Unreliable in PDF viewers
Primary Navigation Strategy: Mouse Wheel Scrolling
The ONLY reliable scrolling method for PDF viewers is mouse wheel:
async (page) => {
await page.mouse.click(800, 500);
await page.waitForTimeout(200);
await page.mouse.wheel(0, 2000);
await page.waitForTimeout(300);
}
Scrolling amounts:
await page.mouse.wheel(0, 1000) - Small scroll (~1 page)
await page.mouse.wheel(0, 2000) - Medium scroll (~2 pages)
await page.mouse.wheel(0, -1500) - Scroll UP
Page Navigation: Close and Reopen
To jump to a specific page:
1. mcp__playwright__browser_close
2. mcp__playwright__browser_navigate with url="https://example.com/contract.pdf#page=68"
3. mcp__playwright__browser_take_screenshot
4. Use Read tool to verify correct page
Reading Screenshots
After every screenshot:
- Use the Read tool with the screenshot file path
- This displays the screenshot content so you can:
- See the current page number (shown in PDF viewer header like "68 / 131")
- Read the text content
- Identify section headings
- Transcribe verbatim text for conditions
Cookie Consent Banners
- Look for buttons: "Accept", "Accept All", "I Agree", "Continue", "Allow"
- Screenshot the banner before clicking
- Use
mcp__playwright__browser_click to dismiss
- Log the interaction
Example Usage
User: Use the closing_conditions_identifier skill with contract_url="https://example.com/merger_agreement.pdf" question="Identify all conditions to closing"
Expected Workflow:
- Navigate to URL, take screenshot
- Read screenshot to see contract loaded
- Scroll through TOC to find "CONDITIONS" article and page number
- Also note "REPRESENTATIONS" article page numbers for cross-referencing
- Close browser
- Reopen at
url#page=XX where XX is conditions page
- Scroll through conditions section, taking screenshots
- Read each screenshot to extract conditions
- For bringdown conditions, parse section references
- Navigate to each referenced R&W section and categorize
- Generate CSV, R&W categorization, and summary outputs
Expected Output Structure:
.playwright-mcp/m_and_a_contract_task/
AcquirerCo_TargetCo_2026/
20260102_143052/
input/
contract_url.txt
question.txt
run_metadata.json
screenshots/
01_contract_overview/
001_contract_loaded.png
02_table_of_contents/
toc_overview.png
toc_conditions_section.png
03_condition_headings/
H001_mutual_conditions.png
H002_company_conditions.png
H003_parent_conditions.png
04_navigation/
nav_001_page68.png
nav_002_page69.png
nav_003_page70.png
05_conditions_evidence/
CC001_context.png
CC001_zoom.png
...
06_rw_cross_reference/
RW_section_2.1_organization.png
RW_section_2.2_capitalization.png
RW_section_2.3_authority.png
RW_section_2.15_brokers.png
RW_section_2.19_fairness.png
RW_section_2.20_information.png
results/
closing_conditions.csv
rw_categorization.csv
rw_analysis_summary.md
closing_conditions_summary.md
audit_manifest.csv
extraction_log.csv
Few-Shot Examples: Recognizing Closing Conditions
Use these as pattern recognition anchors. Each should be extracted verbatim with appropriate metadata.
Example 1: Bringdown Timing (Signing and Closing)
Pattern: representations and warranties... shall be true and correct at the date hereof and the Closing
CSV row notes: "bringdown of representations and warranties - dual timing (signing + closing)"
R&W Categorization: Parse all section references and categorize each
Example 2: Bringdown with Materiality Scrape
Pattern: shall be true and correct in all respects (disregarding all materiality and "Company Material Adverse Effect" qualifiers contained therein)
CSV row notes: "bringdown with materiality/MAE qualifier scrape"
R&W Categorization: Mark materiality_scrape: yes for these sections
Example 3: Fundamental vs Non-Fundamental Split
Pattern:
- "(i) The representations in Section 2.1(a), Section 2.2(a), Section 2.3... shall be true and correct in all material respects"
- "(ii) the representations in Section 2.3(b) and Section 2.3(c), disregarding all qualifications..."
R&W Categorization:
- Sections in (i):
fundamental: yes, bringdown_standard: all_material_respects
- Sections in (ii):
fundamental: no, materiality_scrape: yes, bringdown_standard: mae_except
Example 4: Covenant Compliance Condition
Pattern: shall have performed and complied with all of its covenants and other obligations under this Agreement in all material respects
CSV row notes: "covenant compliance condition"
Example 5: No Legal Impediment
Pattern: No Governmental Entity of competent jurisdiction shall have enacted, issued, promulgated, enforced or entered any Law or Order that is then in effect and has the effect of making the Merger illegal or otherwise prohibiting consummation of the Merger
CSV row notes: "no legal impediment condition"
Example 6: Regulatory Approval
Pattern: Any waiting period applicable to the consummation of the Merger under the HSR Act shall have expired or been earlier terminated
CSV row notes: "HSR Act waiting period expiration"
Error Handling
URL Not Accessible
- Screenshot the error page
- Log the error in extraction_log.csv
- Write error details to run_metadata.json
- Create empty closing_conditions.csv with headers only
Cannot Navigate to Specific Page
- If close/reopen with #page=X doesn't work, use mouse wheel scrolling
- Estimate scroll amount: roughly 1000-1500 pixels per page
- Take frequent screenshots to track position
No Conditions Found
- Verify by scrolling through entire document
- Check for alternate terminology ("Conditions Precedent", "Conditions to Consummation")
- Screenshot the table of contents
- Log all search terms used in extraction_log.csv
- Create closing_conditions.csv with headers only and note in summary
Ambiguous Condition
- Include it with
confidence: low
- Add detailed notes explaining the ambiguity in the notes column
- Capture extra screenshots showing context
Cannot Find Referenced R&W Section
- Log the missing section in extraction_log.csv
- Mark as
confidence: low in rw_categorization.csv
- Note in
notes column that section could not be located
- Continue with other sections
Deal-Points Template CSV Population Mode
When provided with a deal-points template CSV, populate it by reading the merger agreement and extracting the required closing conditions deal points.
Template Location
The deal-points template CSV can be found at:
m_and_a_contract_task/deal_point_template/dealpoints_contract_1_conditions_to_closing_template.csv
Template CSV Structure
The template CSV has these columns:
category, text_type, question, subquestion, answer_type, agent_answer, agent_evidence
Your task is to complete every row with:
agent_answer - The extracted answer
agent_evidence - A short verbatim quote (and section/page reference if visible)
Rules for Template Population
-
No guessing. If you cannot find support in the contract text, set:
agent_answer = UNKNOWN
agent_evidence = "Not found in provided text"
-
Evidence must be verbatim from the contract. Keep it short but decisive (1–3 sentences).
-
Use the template taxonomy exactly. Do not rename questions/subquestions.
-
Reuse evidence if the same clause supports multiple rows (allowed and expected).
How to Populate by answer_type
A) single_choice
Write the correct deal-point value in agent_answer using the contract's standard/wording.
Examples of what you're extracting:
- Bring-down standard for general reps & warranties
- Bring-down standard for capitalisation / outstanding shares
- Covenant compliance condition standard
Common values:
| Deal Point | Possible Values |
|---|
| Bring-down standard | true_and_correct, all_material_respects, mae_except, true_correct_all_material_respects |
| Covenant compliance | all_material_respects, in_all_respects, material_compliance |
| MAE definition | customary, narrow, broad |
Example row:
Conditions to Closing,Accuracy of Target R&W Closing Condition,"Accuracy of Target ""General"" R&W: Bringdown Standard Answer",<NONE>,single_choice,MAE Qualifier,"...shall be true and correct (without giving effect to any limitation as to materiality or Company Material Adverse Effect) except where the failure to be so true and correct would not reasonably be expected to have a Company Material Adverse Effect..."
B) checkbox_0_or_1
For each row, set agent_answer to:
1 if that subquestion item IS included
0 if that subquestion item IS NOT included
Evidence should quote the part of the bring-down clause listing which specific reps/sections are treated as "fundamental" (or the relevant portion showing inclusion/exclusion).
Example: Identifying Fundamental Reps
If the bringdown condition states:
"The representations and warranties in Section 2.1(a) (first sentence only), Section 2.2(a) (first sentence only), Section 2.3, Section 2.15, Section 2.19 and Section 2.20 shall be true and correct in all material respects..."
Then populate:
| subquestion | agent_answer | agent_evidence |
|---|
| organization | 1 | "Section 2.1(a) (first sentence only)... shall be true and correct in all material respects" |
| capitalization | 1 | "Section 2.2(a) (first sentence only)... shall be true and correct in all material respects" |
| authority | 1 | "Section 2.3... shall be true and correct in all material respects" |
| brokers_fee | 1 | "Section 2.15... shall be true and correct in all material respects" |
| opinion_of_financial_advisor | 1 | "Section 2.19... shall be true and correct in all material respects" |
| information_supplied | 1 | "Section 2.20... shall be true and correct in all material respects" |
| rights_agreement | 0 | "Not found in provided text" |
| anti_takeover | 0 | "Not found in provided text" |
| environmental | 0 | "Not found in provided text" |
| taxes | 0 | "Not found in provided text" |
C) one_of_0_or_1
Use for mutually exclusive options where only ONE of a group should be marked 1, and all others 0.
Example: Materiality/MAE Scrape applies to
If the contract states the materiality scrape applies to general R&Ws:
| subquestion | agent_answer | agent_evidence |
|---|
| General R&Ws | 1 | "...disregarding all qualifications as to materiality or Material Adverse Effect..." |
| Specified R&Ws only | 0 | "Not applicable - scrape applies to general R&Ws" |
| fundamental/Special R&Ws | 0 | "Not applicable - scrape applies to general R&Ws" |
Key difference from checkbox_0_or_1: In one_of_0_or_1, exactly ONE option in the group should be 1. In checkbox_0_or_1, multiple items can be 1.
D) yes_no
Set agent_answer to:
yes if the condition/provision is present
no if the condition/provision is absent
Example:
Conditions to Closing,hsr_condition,Is there an HSR waiting period condition?,<NONE>,yes_no,yes,"Any waiting period applicable to the consummation of the Merger under the HSR Act shall have expired or been earlier terminated."
E) text
Provide a brief verbatim excerpt or summary as the answer.
Example:
Conditions to Closing,MAE Definition,What are the MAE carve-outs?,<NONE>,text,"changes in general economic conditions, changes in the industries in which the Company operates, changes in law or GAAP","...shall not be deemed to include any change, effect, event or circumstance resulting from: (i) changes in general economic, business, regulatory, political or market conditions...(ii) changes in the industries in which the Company operates..."
Cross-Referencing Workflow for Template Population
When populating checkbox items for R&W categories:
- Find the bringdown condition in the Conditions to Closing section
- Parse all section references mentioned in the bringdown
- Navigate to Article II (Company Representations) to identify what each section covers
- Map each section to an R&W category using the standard taxonomy
- Mark as
1 any category explicitly referenced in the bringdown
- Mark as
0 any category NOT referenced
Section-to-Category Mapping Reference
Use this reference to map contract sections to R&W categories:
| Typical Section | R&W Category | Description |
|---|
| Section 2.1 | organization | Organization, Standing and Power |
| Section 2.2 | capitalization | Capital Structure, Outstanding Shares |
| Section 2.2(b), 2.2(c) | capitalization_other | Options, Warrants, Convertibles |
| Section 2.3(a) | authority | Authority to Execute |
| Section 2.3(a) | approval | Board/Stockholder Approval |
| Section 2.3(a) | enforceability | Valid and Binding |
| Section 2.3(b) | no_conflict | Non-contravention |
| Section 2.3(c) | consents | Required Consents |
| Section 2.4 | sec_filings | SEC Reports, Financial Statements |
| Section 2.5 | absence_of_changes | No MAE Since Date |
| Section 2.6 | litigation | Legal Proceedings |
| Section 2.7 | compliance_with_laws | Compliance with Laws |
| Section 2.8 | title_to_assets | Title to Assets |
| Section 2.9 | intellectual_property | IP, Patents, Trademarks |
| Section 2.10 | environmental | Environmental Matters |
| Section 2.11 | taxes | Tax Matters |
| Section 2.12 | employee_benefits | ERISA, Benefit Plans |
| Section 2.13 | labor_matters | Labor Relations |
| Section 2.14 | insurance | Insurance Policies |
| Section 2.15 | brokers_fee | Brokers' Fees |
| Section 2.16 | material_contracts | Material Contracts |
| Section 2.17 | related_party | Related Party Transactions |
| Section 2.18 | anti_takeover | Takeover Statutes |
| Section 2.18 | rights_agreement | Rights Plan / Poison Pill |
| Section 2.19 | opinion_of_financial_advisor | Fairness Opinion |
| Section 2.20 | information_supplied | Proxy Statement Info |
Note: Section numbers vary by contract. Always verify by reading the actual section headings.
Template Output: results/deal_points_template_completed.csv
Save the completed template to this file with all agent_answer and agent_evidence columns populated.
Example completed output:
category,text_type,question,subquestion,answer_type,agent_answer,agent_evidence
Conditions to Closing,Accuracy of Target R&W Closing Condition,"Accuracy of Target ""General"" R&W: Bringdown Standard Answer",<NONE>,single_choice,MAE Qualifier,"...shall be true and correct (without giving effect to any limitation as to materiality or Company Material Adverse Effect) except where the failure...would not reasonably be expected to have a Company Material Adverse Effect..."
Conditions to Closing,Accuracy of Target R&W Closing Condition,Accuracy of Target Capitalization R&W (outstanding shares): Bringdown Standard Answer,<NONE>,single_choice,True and correct in all respects,"The representations and warranties set forth in the first sentence of Section 2.2(a) shall be true and correct in all respects..."
Conditions to Closing,Accuracy of Target R&W Closing Condition,Accuracy of Fundamental Target R&Ws-Types of R&Ws,Authority,checkbox_0_or_1,1,"Section 2.3..."
Conditions to Closing,Accuracy of Target R&W Closing Condition,Accuracy of Fundamental Target R&Ws-Types of R&Ws,Organization,checkbox_0_or_1,1,"Section 2.1(a) (first sentence only)..."
Conditions to Closing,Accuracy of Target R&W Closing Condition,Accuracy of Fundamental Target R&Ws-Types of R&Ws,Rights Agreement,checkbox_0_or_1,0,"Not found in provided text"
Conditions to Closing,Accuracy of Target R&W Closing Condition,Materiality/MAE Scrape applies to,General R&Ws,one_of_0_or_1,1,"...disregarding all qualifications as to materiality..."
Conditions to Closing,Accuracy of Target R&W Closing Condition,Materiality/MAE Scrape applies to,Specified R&Ws only,one_of_0_or_1,0,"Not applicable - scrape applies to general R&Ws"
Conditions to Closing,Compliance with Covenant Closing Condition,Compliance with Target Covenant Closing Condition-Answer,<NONE>,single_choice,All material respects,"...shall have performed and complied with all of its covenants and other obligations under this Agreement in all material respects..."