Bezlo MCP

v0.1.2
io.github.gba3124/bezlo-mcp Checked 3 days ago Published 1 month ago

Bezlo MCP: device-preset mobile screenshots, layout diagnostics, see-and-act sessions.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_sessions

List open interactive sessions (id, url, device).

list_devices

List the Bezlo device presets (iPhone, Android, iPad, desktop) with width/height/dpr. Pass an optional category to filter.

ParameterTypeDescription
categorystringOptional category filter

capture_page

Render a URL in Chrome for Testing with a real device preset (viewport, DPR, mobile UA/touch) and return a PNG screenshot plus layout diagnostics (horizontal overflow + offending elements, safe-area insets, media features, viewport/screen sizes). Use it to check mobile/web layouts, responsive bugs, and before/after fixes.

ParameterTypeDescription
url *stringhttp(s) URL to render
darkModebooleanRender with prefers-color-scheme: dark
devicestringDevice id or name, e.g. iphone16, "iPhone 15 Pro", ipadpro11, px10 (default iphone16)
fullPagebooleanCapture the full scrollable page (default: viewport only)
scrollYnumberScroll to this Y offset before capture
selectorstringWait for this CSS selector before capture
waitMsnumberExtra wait after load before capture (default 1200)

capture_matrix

Capture the same URL on several device presets in one call (matrix). Returns each device screenshot + layout; use it to compare iPhone/iPad/Android side by side.

ParameterTypeDescription
url *string
devicesarrayDevice ids/names (1–6), e.g. ["iphone16","ipadpro11","px10"]
enginestring
fullPageboolean
selectorstring
waitMsnumber

session_assert

Assert checks against an open session and return pass/fail per check. Checks: visible, text (contains), inputValue (equals), urlIncludes, noOverflow, noConsoleErrors, elementCount (min). Use after actions to verify a flow.

ParameterTypeDescription
checks *array
sessionId *string

run_flow

Open a session, execute a list of actions in one call, and return a compact step report plus the final screenshot (optionally a screenshot per step). Use it to run a whole test flow: sign in, open a drawer, submit a form — then inspect the report.

ParameterTypeDescription
steps *arrayAction objects, same schema as session_act action
url *string
assertsarrayAssertions evaluated after the last step (same schema as session_assert checks)
devicestring
enginestringChromium (default) records video; webkit is a Safari-flavoured approximation
recordbooleanRecord a webm video of the flow (and a gif when ffmpeg is available)
screenshotsstringSave final only (default), every step, or none

session_route

Mock a network response for an open session (Playwright route). Give a URL pattern/glob and {status, json|body|contentType|headers} or {abort:true}. Use it to test error states without a real backend.

ParameterTypeDescription
pattern *stringURL glob, e.g. **/api/items or **/missing.png
sessionId *string
responseobject

session_route_clear

Remove all network mocks from a session.

ParameterTypeDescription
sessionId *string

session_start

Open an interactive device session on a URL (iPhone/Android/iPad preset). Returns the first observation: screenshot, labeled interactive elements (refs e1..eN with selector/role/name/rect), layout diagnostics, and console/page errors. Use session_act to tap/type/scroll, then read the fresh observation it returns.

ParameterTypeDescription
url *string
darkModeboolean
devicestringDevice id or name (default iphone16)
enginestringwebkit gives a Safari-flavoured approximation (no recording/CDP a11y)
selectorstringWait for this selector before observing
waitMsnumberWait after load before the first observation (default 800)

session_observe

Re-observe an open session: fresh screenshot, interactive element list, layout diagnostics, scroll position, and any console/page errors since the last call.

ParameterTypeDescription
sessionId *string

session_act

Perform one action in a session and return the new observation (screenshot + elements + errors). Actions: click (index | text | selector | role+name | x+y), type (target + value + submit?), scroll (dy?), press (key), goto (url), back, reload, wait (ms). Prefer the `index` of an element from the latest observation.

ParameterTypeDescription
action *object
sessionId *string

session_end

Close an interactive session and its browser.

ParameterTypeDescription
sessionId *string

inspect_page

Same device-preset render as capture_page but returns only layout diagnostics (no image) — cheaper for quick overflow/safe-area checks.

ParameterTypeDescription
url *string
darkModeboolean
devicestring
scrollYnumber
selectorstring
waitMsnumber