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):
| Path | Type | Notes |
|---|---|---|
content[0].type | "text" | MCP content block discriminator |
content[0].text | string | JSON 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):
| Field | Type | Default | Notes |
|---|---|---|---|
url | string (URL) | — | Must be absolute https://… |
width | number | 1920 | Viewport width, 100–3840 |
height | number | 1080 | Viewport height, 100–2160 |
fullPage | boolean | false | Full scrollable page |
delay | number | 0 | Extra wait after load (ms), max 30000 |
cacheTtl | number | 86400 | Seconds 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 |
deviceScaleFactor | number | 1 | Viewport pixel ratio, 1–3 (Retina / sharpness) |
hideSelectors | string[] | [] | Up to 40 CSS selectors (each ≤500 chars); hidden after load |
Return (successful callTool result):
| Path | Type | Notes |
|---|---|---|
content[0].type | "image" | MCP image content block |
content[0].data | string | Base64-encoded PNG or JPEG bytes |
content[0].mimeType | "image/png" | "image/jpeg" | Matches requested format |
_meta.cached | boolean | undefined | true when served from R2 cache |
_meta.renderTimeMs | number | undefined | Browser 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):
| Field | Type | Default | Notes |
|---|---|---|---|
url | string (URL) | — | Page to capture |
prompt | string | (short default) | Instruction for the vision model |
width | number | 1920 | Viewport width |
height | number | 1080 | Viewport height |
fullPage | boolean | false | Full page capture |
colorScheme | "light" | "dark" | "no-preference" | "no-preference" | Same as take_screenshot |
deviceScaleFactor | number | 1 | Same as take_screenshot (1–3) |
hideSelectors | string[] | [] | Same as take_screenshot |
Return (successful callTool result):
| Path | Type | Notes |
|---|---|---|
content[0].type | "image" | JPEG screenshot (capture is always JPEG for vision) |
content[0].data | string | Base64-encoded JPEG bytes |
content[0].mimeType | "image/jpeg" | Fixed for this tool |
content[1].type | "text" | Vision model output |
content[1].text | string | Model answer to your prompt |
_meta.renderTimeMs | number | undefined | Browser 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.