{"at":"2026-11-23T02:34:08.425Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T02:34:08.856Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T02:34:08.956Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T02:34:09.390Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"pixelpact-mcp","version":"0.1.6"}}}}
{"at":"2026-11-23T02:34:09.390Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T02:34:09.390Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T02:34:09.395Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"openWorldHint":true,"readOnlyHint":false,"title":"Extract contract"},"description":"Extracts a visual contract from a reference URL and saves it as JSON at outputPath. Call this once per reference design, before check_implementation or diff_pixels can be used, since both need a saved contract to compare against. Pass screenshotDir to also capture reference screenshots, which diff_pixels requires later. Returns a summary: the element count per viewport, any extraction warnings, and the path the contract was written to.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"freezeAnimations":{"description":"Freeze CSS animations before measuring. Defaults to true.","type":"boolean"},"fullPage":{"description":"Capture the full scrollable page instead of only the viewport. Defaults to true.","type":"boolean"},"headless":{"description":"Run the browser headless. Defaults to true.","type":"boolean"},"masks":{"description":"CSS selectors to exclude from the walk, for example ads or timestamps.","items":{"minLength":1,"type":"string"},"type":"array"},"maxElements":{"description":"Maximum elements to walk, 0 means unbounded. Defaults to 600.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxStates":{"description":"Maximum interactive elements to probe for hover and focus. Defaults to 120.","maximum":9007199254740991,"minimum":0,"type":"integer"},"outputPath":{"description":"Filesystem path to write the contract JSON to, for example ./contracts/home.json.","minLength":1,"type":"string"},"screenshotDir":{"description":"Directory to save reference screenshots to. Required later for diff_pixels to work.","minLength":1,"type":"string"},"selector":{"description":"CSS selector to scope the walk to. Defaults to the document body.","minLength":1,"type":"string"},"timeout":{"description":"Navigation timeout in milliseconds. Defaults to 30000.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"url":{"description":"The reference URL to extract a visual contract from.","minLength":1,"type":"string"},"viewports":{"description":"Viewports to capture. Defaults to desktop 1440x900, tablet 768x1024, mobile 390x844.","items":{"properties":{"height":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"name":{"minLength":1,"type":"string"},"width":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["name","width","height"],"type":"object"},"type":"array"},"wait":{"description":"Extra settle time in milliseconds after navigation. Defaults to 2000.","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["url","outputPath"],"type":"object"},"name":"extract_contract","title":"Extract a visual contract"},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"Check implementation"},"description":"Measures an implementation URL against a previously saved visual contract: box position and size, computed styles, hover and focus states, and pseudo-elements. Call this after building or changing a UI to verify it matches the reference without a human looking at it. Needs contractPath from a prior extract_contract call. Returns a formatted deviation table (capped at 40 rows, with a note on how many were left out) plus the numeric totals, the pass rate, any missing selectors, and ok, which is true only when nothing deviated and nothing is missing.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"contractPath":{"description":"Path to a contract JSON file previously written by extract_contract.","minLength":1,"type":"string"},"headless":{"description":"Run the browser headless. Defaults to true.","type":"boolean"},"maxStates":{"description":"Maximum interactive elements to probe. Defaults to 120.","maximum":9007199254740991,"minimum":0,"type":"integer"},"selector":{"description":"CSS selector to scope the check to. Defaults to the contract root.","minLength":1,"type":"string"},"timeout":{"description":"Navigation timeout in milliseconds. Defaults to 30000.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"tolerance":{"description":"Allowed pixel tolerance for box and length values. Defaults to 1.","minimum":0,"type":"number"},"url":{"description":"The implementation URL to measure against the contract.","minLength":1,"type":"string"},"viewport":{"description":"Viewport name to check, for example desktop. Defaults to the first viewport in the contract.","minLength":1,"type":"string"},"wait":{"description":"Extra settle time in milliseconds after navigation. Defaults to 2000.","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["contractPath","url"],"type":"object"},"name":"check_implementation","title":"Check an implementation against a contract"},{"annotations":{"openWorldHint":true,"readOnlyHint":true,"title":"Diff pixels"},"description":"Renders the implementation URL and compares it pixel by pixel against the reference screenshot stored in the contract. Use this for a stricter visual check than check_implementation, after the structural check passes or when a subtle rendering difference is suspected. Requires the contract to have been extracted with screenshotDir set. Returns the percentage of differing pixels, the threshold it was compared against, ok, and the filesystem path of the generated diff image.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"contractPath":{"description":"Path to a contract JSON file previously written by extract_contract.","minLength":1,"type":"string"},"headless":{"description":"Run the browser headless. Defaults to true.","type":"boolean"},"masks":{"description":"CSS selectors to blank out before comparing, for example ads or timestamps.","items":{"minLength":1,"type":"string"},"type":"array"},"outDir":{"description":"Directory to write the diff image to. Defaults to the OS temp directory.","minLength":1,"type":"string"},"selector":{"description":"CSS selector to scope the comparison to. Defaults to the contract root.","minLength":1,"type":"string"},"threshold":{"description":"Allowed percent of differing pixels before the comparison fails. Defaults to 0.5.","maximum":100,"minimum":0,"type":"number"},"timeout":{"description":"Navigation timeout in milliseconds. Defaults to 30000.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"url":{"description":"The implementation URL to capture and compare pixel by pixel.","minLength":1,"type":"string"},"viewport":{"description":"Viewport name to compare. Defaults to the first viewport in the contract.","minLength":1,"type":"string"},"wait":{"description":"Extra settle time in milliseconds after navigation. Defaults to 2000.","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["contractPath","url"],"type":"object"},"name":"diff_pixels","title":"Pixel-diff an implementation against a contract screenshot"},{"annotations":{"openWorldHint":false,"readOnlyHint":true,"title":"Read contract summary"},"description":"Reads a saved contract file and describes it without opening a browser or making any network request. Use this to inspect what a contract covers, for example before deciding whether diff_pixels is possible, since that needs screenshots to already exist. Returns the original source URL, when it was extracted, the viewports it covers, the element count per viewport, whether reference screenshots exist, and any warnings recorded at extraction time.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"contractPath":{"description":"Path to a contract JSON file previously written by extract_contract.","minLength":1,"type":"string"}},"required":["contractPath"],"type":"object"},"name":"read_contract_summary","title":"Read a saved contract summary"}]}}}
