page_match_image
Locate a target image inside a webpage screenshot via pixel-accurate template matching. Returns match positions and confidence scores for captcha gaps, glyphs, and logos.
Instructions
REAL TEMPLATE MATCHING: multi-scale normalized cross-correlation of a needle against a haystack, computed IN-PAGE at full grayscale resolution (no grid loss). Returns top matches [{x, y, score, scale}] — needle-center positions in haystack-image pixels. needle_rect optionally crops the needle (e.g. an instruction glyph band from the same image — GeeTest icon-click pattern). Images are cached per URL: single-use challenge URLs fetch exactly once. THE tool for: captcha piece->gap, glyph->character, logo->page.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"page_id": "<page_id>",
"needle_ref": "<needle_ref>",
"hay_ref": "<hay_ref>"
},
"name": "page_match_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hay_ref | Yes | Ref of the HAYSTACK element to search in. | |
| page_id | Yes | ||
| hay_rect | No | Optional search-region crop of the haystack (x, y, w, h in haystack-image px). Omit for the full image. USE THIS to exclude the needle's own area (self-match guard). | |
| needle_ref | Yes | Ref of the NEEDLE element (canvas / img / background-image). | |
| session_id | Yes | ||
| needle_rect | No | Optional crop of the needle image (x, y, w, h in needle-image px). Omit to use the whole image. Use this to match a sub-region (e.g. an instruction glyph band inside the same image). |