Skip to content

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_content

Required scope:

pages:content:serialize

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.

InputTypeRequiredNotes
urlstringYesPage URL to serialize.
extraction_modestringNoOptional extraction profile. Omit unless instructed otherwise.
max_charsintegerNo1 to 25,000. Defaults to a bounded chunk.
offsetintegerNoUse for pagination through long content.

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"
}
}
}

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.

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.

Serialize https://www.sleepwalker.ai and summarize the page structure.
ErrorMeaning
Missing urlThe tool requires a URL.
Invalid extraction_modeOmit the field or use a supported profile.
Insufficient creditsThe account needs more credits for billable actions.
Page blockedThe target site blocked or denied extraction.