Skip to content

Serialize content with MCP

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.

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.

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.
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.