API reference — MCP tools

Clients use MCP over Streamable HTTP at https://screenshotx402.com/mcp (not a REST OpenAPI surface). This page lists each tool’s arguments JSON shape. List prices match the landing page and /discovery.json.

health (free)

Smoke test and discovery; no x402 payment.

Input (arguments):

Pass an empty JSON object: {}. No fields.

Return (successful callTool result):

PathTypeNotes
content[0].type"text"MCP content block discriminator
content[0].textstringJSON string: { ok: boolean, name: string, x402Network: string }

take_screenshot (paid)

List price: $0.01 per successful invocation (x402 settlement).

Input (arguments, JSON, validated with Zod):

FieldTypeDefaultNotes
urlstring (URL)Must be absolute https://…
widthnumber1920Viewport width, 100–3840
heightnumber1080Viewport height, 100–2160
fullPagebooleanfalseFull scrollable page
delaynumber0Extra wait after load (ms), max 30000
cacheTtlnumber86400Seconds to treat R2 entry as fresh; 0 skips cache reads
format"png" | "jpeg""png"Output image type
colorScheme"light" | "dark" | "no-preference""no-preference"Emulates prefers-color-scheme before navigation
deviceScaleFactornumber1Viewport pixel ratio, 1–3 (Retina / sharpness)
hideSelectorsstring[][]Up to 40 CSS selectors (each ≤500 chars); hidden after load

Return (successful callTool result):

PathTypeNotes
content[0].type"image"MCP image content block
content[0].datastringBase64-encoded PNG or JPEG bytes
content[0].mimeType"image/png" | "image/jpeg"Matches requested format
_meta.cachedboolean | undefinedtrue when served from R2 cache
_meta.renderTimeMsnumber | undefinedBrowser capture time when not cached

analyze_screenshot (paid)

List price: $0.03 per successful invocation.

Renders a JPEG screenshot, sends it to a vision model (OpenRouter defaults include qwen/qwen3.5-flash-02-23 then openai/gpt-4o-mini with OPENROUTER_API_KEY; OpenAI gpt-4o then gpt-4o-mini with OPENAI_API_KEY). Optional VISION_MODEL, VISION_MODELS (comma-separated fallback chain), VISION_API_BASE.

Input (arguments):

FieldTypeDefaultNotes
urlstring (URL)Page to capture
promptstring(short default)Instruction for the vision model
widthnumber1920Viewport width
heightnumber1080Viewport height
fullPagebooleanfalseFull page capture
colorScheme"light" | "dark" | "no-preference""no-preference"Same as take_screenshot
deviceScaleFactornumber1Same as take_screenshot (1–3)
hideSelectorsstring[][]Same as take_screenshot

Return (successful callTool result):

PathTypeNotes
content[0].type"image"JPEG screenshot (capture is always JPEG for vision)
content[0].datastringBase64-encoded JPEG bytes
content[0].mimeType"image/jpeg"Fixed for this tool
content[1].type"text"Vision model output
content[1].textstringModel answer to your prompt
_meta.renderTimeMsnumber | undefinedBrowser capture time

Payment (x402)

Paid tools return payment-required metadata until a valid authorization is attached; clients using withX402Client handle signing and retries. See x402.org.

Source of truth in repo: src/mcp-tool-params.ts and Zod in src/index.ts.