create_session
Create a new sncro session. Returns a session key and secret.
Args:
project_key: The project key from CLAUDE.md (registered at sncro.net)
git_user: The current git username (for guest access control). If
omitted or empty, the call is treated as a guest session — allowed
only when the project owner has "Allow guest access" enabled.
brief: If True, skip the first-run briefing (tool list, tips, mobile
notes) and return a compact response. Pass this on the second and
subsequent create_session calls in the same conversation, once
you already know how to use the tools.
After calling this, tell the user to paste the enable_url in their browser.
Then use the returned session_key and session_secret with all other sncro tools.
If no project key is available: tell the user to go to https://www.sncro.net/projects
to register their project and get a key. It takes 30 seconds — sign in with GitHub,
click "+ Add project", enter the domain, and copy the project key into CLAUDE.md.
get_console_logs
Get recent console logs and errors from the browser.
Returns the latest console output and any JavaScript errors,
including unhandled exceptions and promise rejections.
This reads from baseline data that the browser pushes every 5 seconds,
so it works even if the browser tab is in the background. If you get a
"no data" error, the browser hasn't connected yet — call check_session
to diagnose, then retry.
query_element
Query a DOM element by CSS selector.
Returns bounding rect, attributes, computed styles, inner text,
and child count. Use this to debug layout, positioning, and
visibility issues.
Requires a connected browser session. If you get BROWSER_NOT_CONNECTED,
call check_session first and wait for "connected" status. If you get
BROWSER_TIMEOUT, the page may be navigating — wait a moment and retry.
Args:
key: The sncro session key
secret: The session secret from create_session
selector: CSS selector (e.g. "#photo-wrap", ".toolbar > button:first-child")
styles: Optional list of CSS properties to read (e.g. ["transform", "width", "display"])
query_all
Query all matching DOM elements by CSS selector.
Returns a summary of each matching element (tag, id, class,
bounding rect, inner text). Useful for checking lists, grids,
or multiple instances of a component.
Requires a connected browser session. If you get BROWSER_NOT_CONNECTED,
call check_session first and wait for "connected" status.
Args:
key: The sncro session key
secret: The session secret from create_session
selector: CSS selector
limit: Max elements to return (default 20)
get_network_log
Get network performance data from the browser.
Returns resource timing entries (URLs, durations, sizes) sorted
by duration (slowest first), plus page navigation timing.
Use this to find slow API calls, large assets, or overall page
load performance.
Requires a connected browser session. If you get BROWSER_NOT_CONNECTED,
call check_session first and wait for "connected" status.
Args:
key: The sncro session key
secret: The session secret from create_session
limit: Max resources to return (default 50)
type: Filter by initiator type (e.g. "fetch", "xmlhttprequest", "img", "script", "css")
get_page_snapshot
Get a high-level snapshot of the current page.
Returns URL, title, viewport dimensions, scroll position,
top-level DOM structure, recent console logs, and recent errors.
Requires a connected browser session. If you get BROWSER_NOT_CONNECTED,
call check_session first and wait for "connected" status.
check_session
Check the connection status of a sncro session.
Call this after create_session to confirm the browser has connected
before using other tools. If status is "waiting", the user hasn't
enabled sncro yet — remind them to click/paste the enable URL,
wait a few seconds, and call check_session again.
Returns:
status: "not_found" | "waiting" | "connected"
session_age_seconds: how long since the session was created
next_step: what to do based on current status
end_session
Explicitly close a sncro session — "Finished With Engines".
Call this when you are done debugging and will not need the sncro tools
again in this conversation. After this returns, all sncro tool calls on
this key will refuse with a SESSION_CLOSED message — that is your signal
to stop trying to use them and not apologise about it.
Use it when:
- The original problem is solved and the conversation has moved on
- The user explicitly says "we're done with sncro for now"
- You're entering a long stretch of work that won't need browser visibility
The session can't be reopened. If you need browser visibility later, ask
the user whether to start a new one with create_session.
report_issue
Report an issue, feature request, or success story for sncro.
IMPORTANT: ALWAYS ask the user before submitting ANY feedback.
Show them exactly what you plan to send and get explicit approval.
Never submit feedback without the user's knowledge and consent.
For ALL categories:
- Draft the text and show it to the user BEFORE submitting
- Wait for explicit approval — do NOT submit until they confirm
- Keep descriptions GENERAL — no proprietary code, no internal
project names, no sensitive data
For SUCCESS STORIES (category: success_story):
- These WILL be displayed publicly on sncro.net
- Ask: "Mind if I share that as a sncro success story?"
- Focus on what sncro did, not what the project is
Args:
project_key: The project key from CLAUDE.md
category: One of: bug, feature_request, usability, documentation, success_story
description: Clear description of the issue, suggestion, or success story
git_user: Your git username