set_page_data
Writes payloads larger than 1 MB into window.__pb_data[key] by chunking data to bypass CDP's 1 MB message limit. Accepts inline strings or file paths, with encodings for string or binary data.
Instructions
Write a payload larger than 1 MB into window.__pb_data[key], chunked past the CDP 1 MB message limit. Source: inline (data) or file (absolute path, read as binary). The page reads window.__pb_data[key] (string or ArrayBuffer per encoding) and window.__pb_data[key + '__complete'] === true. Never write one key from parallel calls — they race. Under ~200 KB use evaluate; for a real use file_upload.
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": {
"key": "<key>",
"source": "<source>"
},
"name": "set_page_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Property name under window.__pb_data (JS identifier, see pattern) | |
| source | Yes | inline: pass data. file: pass an absolute path, read as binary | |
| encoding | No | utf8 (inline default) keeps a string; binary (file default) gives an ArrayBuffer for FileReader/Blob/fetch; base64 keeps the base64 string | |
| chunkSize | No | Raw bytes per chunk before base64 (default 500000; max 700000) |