Page serialization
serialize_sleepwalker_page_content returns Sleepwalker’s normalized page content view for a URL.
Use it when the agent needs to inspect what is on a page before deciding what to do next.
serialize_sleepwalker_page_contentRequired scope:
pages:content:serializeWhen To Use It
Section titled “When To Use It”Use this tool when the user asks for:
- page content extraction
- visible headings and body content
- normalized copy for agent analysis
- a lightweight page view without scoring
Do not use it when the user wants Content Intelligence scoring, AI Visibility prompt suggestions, or a saved run. Use the narrower action that matches the user request.
Inputs
Section titled “Inputs”| Input | Type | Required | Notes |
|---|---|---|---|
url | string | Yes | Page URL to serialize. |
extraction_mode | string | No | Optional extraction profile. Omit unless instructed otherwise. |
max_chars | integer | No | 1 to 25,000. Defaults to a bounded chunk. |
offset | integer | No | Use for pagination through long content. |
Output Shape
Section titled “Output Shape”The response contains a serialization object:
{ "serialization": { "url": "https://www.sleepwalker.ai", "http_status": 200, "content_view": "## Page: ...", "content_view_offset": 0, "content_view_chars": 9025, "content_view_truncated": true, "next_offset": 1200, "billing": { "billable": true, "credit_action": "pages.content.serialize", "estimated_credits": "1.00", "credits_enforced": true, "status": "settled" } }}Credits
Section titled “Credits”Page content serialization costs 1 credit when it completes successfully.
If the page is blocked, unavailable, or rejected before work begins, credits are not settled for successful work.
See MCP billing for the billing fields.
Pagination
Section titled “Pagination”If content_view_truncated is true, call the tool again with offset: next_offset.
Example:
Fetch the next page serialization chunk using next_offset.Agents should not request the largest possible chunk unless the user needs it.
Example Prompt
Section titled “Example Prompt”Serialize https://www.sleepwalker.ai and summarize the page structure.Common Errors
Section titled “Common Errors”| Error | Meaning |
|---|---|
Missing url | The tool requires a URL. |
Invalid extraction_mode | Omit the field or use a supported profile. |
| Insufficient credits | The account needs more credits for billable actions. |
| Page blocked | The target site blocked or denied extraction. |