devcdp

v5.0.1
io.github.Dayananda-D/devcdp Checked 3 days ago Published 2 months ago

Chrome DevTools for AI assistants: console, network, DOM, source maps, breakpoints, live variables.

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

workflow_guide

How to use DevCDP effectively: the observe/act division of labour, the fastest path from a bug report to an exact line, and the traps worth knowing. Call it once at the start of a debugging session.

devtools_connect

Attach to a Chrome tab over the DevTools Protocol and start observing it (console, network, DOM, debugger). Claims the tab so no other DevCDP session can drive it, marks it visibly in the browser, and reports what was loaded before we attached. Call this once at the start of a debugging session.

ParameterTypeDescription
allow_new_tabbooleanIf every tab is already claimed by another session, open a new one instead of failing.
browserstring'new' launches a separate isolated Chrome on the next free port — a browser no other session has touched.
hoststringChrome host.
portnumberChrome remote-debugging port.
targetstring'visible' (the tab on screen) | 'url-match:<substring>' | 'index:<n>' from list_tabs | 'new' | a URL substring.
windowstring'new' gives this session its own browser window — the fallback when Chrome tab groups are unavailable.

devtools_status

Connection health and buffer accounting: which tab is attached, how many console/network/script entries are held, whether the debugger is paused, and whether anything has been evicted from the buffers.

devtools_disconnect

Detach cleanly: resume the page if it is paused at a breakpoint, remove every breakpoint we set, remove the in-page badge, and release the tab claim so another session can use it. Always call this when you are done.

list_tabs

List the debuggable tabs in Chrome with their index, title, URL, whether each is the visible one, and which DevCDP session (if any) currently owns it. Use the index with target:'index:<n>' in devtools_connect.

ParameterTypeDescription
hoststringChrome host.
portnumberChrome remote-debugging port.
probebooleanCheck which tab is really visible (one extra round trip).

sessions_list

Show every DevCDP session currently running on this machine and the tabs each one holds. Use it to understand why a tab is unavailable, or to confirm two agents are not fighting over the same page.

page_navigate

Navigate the attached tab to a URL. Returns as soon as the navigation is committed, not when loading finishes — wait for a specific request with network_wait_for_request, or for text with Playwright, before asserting.

ParameterTypeDescription
url *stringAbsolute URL to open.

page_interrupt

Abort the JavaScript the page is currently running. Use it when a tool reports PAGE_UNRESPONSIVE — an infinite loop or a long synchronous task has blocked the main thread. This is the only thing that frees it: reloading and navigating do not, because the blocked thread never processes them. The page keeps its DOM and state; only the in-flight script is killed.

page_reload

Reload the attached tab. Useful right after attaching, because console history and network traffic from before the attach cannot be recovered — a reload replays everything with DevCDP watching.

ParameterTypeDescription
bypass_cachebooleanIgnore the HTTP cache (hard reload).

console_get_logs

Read console output captured since attach: logs, warnings, uncaught exceptions with file, line and stack. Pass cursor=nextCursor from a previous call to get only what is new. Note that Chrome does not replay messages logged before DevCDP attached — reproduce the action or call page_reload to see those.

ParameterTypeDescription
clearbooleanEmpty the buffer after reading.
cursornumberReturn only entries with seq greater than this. 0 for everything held.
include_agentbooleanInclude DevCDP's own diagnostics, normally hidden so they cannot be mistaken for app errors.
levelstringOnly this level.
limitnumberMaximum entries to return (most recent first in the buffer order).
sincestringISO timestamp lower bound.

console_evaluate

Run a JavaScript expression in the page and return its value. On failure returns the full exception detail (message, 1-based line and column, URL, stack). Use it to read app state; use debugger_evaluate_at_frame instead when you are paused and need a local variable.

ParameterTypeDescription
expression *stringJavaScript to evaluate in the page's main frame.
await_promisebooleanAwait the result if the expression returns a promise.
timeout_msnumberAbandon the evaluation after this long.

runtime_evaluate_many

Evaluate several named expressions in one round trip and get a map of name to result. Use it to sample a lot of app state at once instead of paying a round trip per question. Individual failures are reported per entry rather than aborting the batch.

ParameterTypeDescription
expressions *arrayArray of { name, expression } objects.
await_promisebooleanAwait promise results.

console_clear

Empty the console buffer so that what you read next belongs only to the action you are about to take. Does not touch the browser's own console display.

network_get_requests

List HTTP requests captured since attach, with method, status, duration, size and initiator. Filter by URL substring, method, status or failures only. Response bodies are opt-in via include_bodies because they are large. Capture starts when DevCDP attaches, so requests from before that are not here — reload to see them.

ParameterTypeDescription
failed_onlybooleanOnly network failures and 4xx/5xx responses.
include_bodiesbooleanInclude response bodies, subject to max_body_bytes.
include_headersbooleanInclude request and response headers.
include_post_databooleanInclude request payloads.
limitnumberMaximum requests to return.
max_body_bytesnumberPer-body byte cap when include_bodies is set.
methodstringOnly this HTTP method, e.g. POST.
min_statusnumberOnly responses with status >= this, e.g. 400 for problems.
offsetnumberSkip this many of the newest matches, for paging back in time.
statusnumberOnly this exact response status.
url_filterstringOnly requests whose URL contains this substring.

network_wait_for_request

Block until a request whose URL contains url_filter completes, then return it. Event driven, so there is no polling. Call this immediately AFTER triggering the action, or pass a filter that has not fired yet — a request that already completed is returned straight away. Gives up after timeout_ms and tells you so.

ParameterTypeDescription
url_filter *stringSubstring the request URL must contain.
allow_existingbooleanSatisfy immediately from an already-completed matching request.
methodstringAlso require this HTTP method.
timeout_msnumberGive up after this long.

network_get_response_body

Fetch the full response body for one requestId from network_get_requests. Chrome discards bodies when the page navigates, so read them while the page is still on the same document.

ParameterTypeDescription
max_body_bytesnumberByte cap; 0 means no limit.
requestIdstringDeprecated spelling of request_id; both work.
request_idstringThe requestId field from a network_get_requests row.

network_clear

Empty the network buffer so the next thing you read belongs only to the action you are about to take. Does not affect the browser's own Network panel.

dom_query

Query elements by CSS selector and return tag, id, classes, text, attributes, geometry and real visibility. Ask for computed styles by naming the properties you want. Set frame:'all' to search inside iframes too — single-page apps often render the screen you care about in a child frame.

ParameterTypeDescription
selector *stringCSS selector.
fieldsarrayRestrict the returned keys, e.g. ['tag','id','text','visible'].
framestring'main' (default), 'all', or a substring of a frame's origin/name.
include_attrsbooleanInclude every HTML attribute of each match. Off by default: attributes dominate the response on real apps.
include_htmlbooleanInclude a truncated outerHTML for each match.
limitnumberMaximum elements to return.
stylesarrayComputed style properties to read, e.g. ['display','zIndex','color'].
visible_onlybooleanDrop elements that are not actually rendered.

dom_list_frames

List the frames and JavaScript execution contexts in the attached tab. Use it when a selector finds nothing — the content may live in an iframe, which needs frame:'all' on dom_query.

dom_get_html

Get the inner or outer HTML of the first element matching a selector, truncated to a byte budget. Useful for understanding structure you cannot infer from dom_query alone.

ParameterTypeDescription
selector *stringCSS selector.
framestring'main' (default), or a substring of a frame's origin/name.
innerbooleaninnerHTML instead of outerHTML.
max_bytesnumberTruncate beyond this many characters.

dom_get_mutations

DOM changes recorded since the last call — what was added, removed or re-attributed, and where. Use it after an action to see whether the app re-rendered at all, which distinguishes 'handler never ran' from 'handler ran and produced nothing'.

ParameterTypeDescription
clearbooleanDrain the buffer as you read it.
limitnumberMaximum records to return.

dialog_detect

Detect modal dialogs, alerts and confirmation overlays that are visible right now, with their title, message and button labels. Detection is structural — ARIA roles, the dialog element, and stacked-overlay geometry — so it works regardless of which UI framework drew it. Call it after any action that might raise a prompt.

ParameterTypeDescription
framestring'main' (default) or 'all' to include iframes.

ui_click

Click an element, identified by CSS selector, visible text or test id. Waits until it is actually clickable — rendered, enabled, stopped moving, and not covered by anything — then dispatches real (trusted) mouse events, and reports what the click caused: requests fired, console errors, whether the DOM changed at all. If it never became clickable it says which of those conditions failed and what was in the way.

ParameterTypeDescription
buttonstringWhich mouse button.
click_countnumber2 for a double-click.
exactbooleanRequire the whole text to match rather than a substring.
forcebooleanSkip the hit-test and click the centre regardless of what is on top. A last resort — it is how you click the wrong thing.
framestring'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame.
modifiersarrayHeld while clicking: shift, ctrl, alt, meta.
nthnumberWhich match to use when several qualify, 0-based.
rolestringNarrow the matches to this ARIA role.
selectorstringCSS selector. Descends into open shadow roots.
testidstringValue of a test attribute (data-testid and friends — see the testAttributes setting).
textstringVisible text on the control. Matches the innermost element that carries it, and follows a <label> to its input.
timeout_msnumberHow long to wait for the element to become actionable before giving up.

ui_hover

Move the pointer over an element and leave it there. Use before clicking anything that only appears on hover — dropdown menus, row action buttons, tooltips — because those elements do not exist to click until something is hovering over their parent.

ParameterTypeDescription
exactbooleanRequire the whole text to match rather than a substring.
framestring'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame.
nthnumberWhich match to use when several qualify, 0-based.
rolestringNarrow the matches to this ARIA role.
selectorstringCSS selector. Descends into open shadow roots.
testidstringValue of a test attribute (data-testid and friends — see the testAttributes setting).
textstringVisible text on the control. Matches the innermost element that carries it, and follows a <label> to its input.
timeout_msnumberHow long to wait for the element to become actionable before giving up.

ui_drag

Drag one element onto another — reordering rows, moving a card between columns, resizing a split. Dispatches a real press, several intermediate moves and a release, because drag implementations almost always ignore a press followed immediately by a release somewhere else.

ParameterTypeDescription
framestring'main' (default) or a substring of a frame's origin/name.
selectorstringCSS selector for what to drag.
stepsnumberIntermediate move events. More is slower but survives pickier drag handlers.
testidstringTest id of what to drag.
textstringVisible text of what to drag.
timeout_msnumberHow long to wait for either element to become actionable.
to_selectorstringCSS selector for where to drop it.
to_testidstringTest id of where to drop it.
to_textstringVisible text of where to drop it.

ui_scroll

Scroll the page, or scroll a specific container. Needed before interacting with anything in a virtualised list or grid, where rows outside the viewport do not exist in the DOM at all — scrolling is what creates them.

ParameterTypeDescription
dxnumberHorizontal pixels; positive is right.
dynumberVertical pixels; positive is down.
framestring'main' (default) or a substring of a frame's origin/name.
selectorstringCSS selector of the container to scroll. Omit to scroll the page.
testidstringTest id of the container to scroll.
textstringVisible text inside the container to scroll.
timeout_msnumberHow long to wait for the container.
tostringJump instead of scrolling by an amount.

ui_press

Press a key — Enter to submit, Tab to move on, Escape to dismiss, arrows to move through a list or grid. Optionally focuses an element first. This is the tool for keyboard-driven screens, where clicking the control is not how the application expects to be used.

ParameterTypeDescription
key *stringKey name: Enter, Tab, Escape, Backspace, Delete, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End, PageUp, PageDown, Space.
exactbooleanRequire the whole text to match rather than a substring.
framestring'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame.
modifiersarrayHeld while pressing: shift, ctrl, alt, meta.
nthnumberWhich match to use when several qualify, 0-based.
rolestringNarrow the matches to this ARIA role.
selectorstringCSS selector. Descends into open shadow roots. Optional: focuses this element first.
testidstringValue of a test attribute (data-testid and friends — see the testAttributes setting). Optional: focuses this element first.
textstringVisible text on the control. Matches the innermost element that carries it, and follows a <label> to its input. Optional: focuses this element first.
timeout_msnumberHow long to wait for the element to become actionable before giving up.
timesnumberPress it this many times.

ui_fill

Set the value of a text field, textarea or contenteditable in one step: assign it and fire input and change. Fast, and it does NOT go through the browser's key-event pipeline — no keydown, no keypress — so the field's own input rules never run. maxlength, digits-only keypress guards and input masks are all bypassed, which is exactly what you want to put a value past a mask and test what happens downstream, and exactly what you do not want when reproducing what a user did: it can leave the field in a state the UI itself would not allow. Use ui_type for that, and for anything reacting per ke…

ParameterTypeDescription
value *stringThe text to put in the field. Pass an empty string to clear it.
exactbooleanRequire the whole text to match rather than a substring.
framestring'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame.
nthnumberWhich match to use when several qualify, 0-based.
rolestringNarrow the matches to this ARIA role.
selectorstringCSS selector. Descends into open shadow roots.
submitbooleanPress Enter afterwards.
testidstringValue of a test attribute (data-testid and friends — see the testAttributes setting).
textstringVisible text on the control. Matches the innermost element that carries it, and follows a <label> to its input.
timeout_msnumberHow long to wait for the element to become actionable before giving up.

ui_type

Type into a field one character at a time with real key events, through the same input pipeline a person's keyboard uses — so the field's own rules apply: maxlength truncates, a keypress guard rejects what it rejects, and a mask reformats as it goes. This is the tool for reproducing user behaviour, and for anything reacting per keystroke: search-as-you-type, autocomplete, validation-on-key. Slower than ui_fill by design. Note that typing leaves the field focused and `change` fires on blur, so pass submit:true (or press Tab) when the application validates on change.

ParameterTypeDescription
text_to_type *stringCharacters to type.
clear_firstbooleanSelect all and delete before typing.
delay_msnumberPause between keystrokes. Raise it if the field drops characters.
exactbooleanRequire the whole text to match rather than a substring.
framestring'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame.
nthnumberWhich match to use when several qualify, 0-based.
rolestringNarrow the matches to this ARIA role.
selectorstringCSS selector. Descends into open shadow roots.
submitbooleanPress Enter afterwards.
testidstringValue of a test attribute (data-testid and friends — see the testAttributes setting).
textstringVisible text on the control. Matches the innermost element that carries it, and follows a <label> to its input.
timeout_msnumberHow long to wait for the element to become actionable before giving up.

ui_select

Choose an option in a dropdown, by visible label or by value. Handles a native <select> directly; for the custom dropdowns most applications actually use — a div that opens a list — it opens the control and clicks the matching option. Reports the options it could see when nothing matches, which is usually the whole answer.

ParameterTypeDescription
option *stringThe option's visible label, or its value attribute.
bystringMatch the label, the value, or either.
exactbooleanRequire the whole text to match rather than a substring.
framestring'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame.
nthnumberWhich match to use when several qualify, 0-based.
rolestringNarrow the matches to this ARIA role.
selectorstringCSS selector. Descends into open shadow roots.
testidstringValue of a test attribute (data-testid and friends — see the testAttributes setting).
textstringVisible text on the control. Matches the innermost element that carries it, and follows a <label> to its input.
timeout_msnumberHow long to wait for the element to become actionable before giving up.

ui_check

Set a checkbox or radio to a specific state, rather than toggling it blindly. Reads the current state first and clicks only if it differs, so calling it twice does not undo the first call — the usual way a 'toggle' helper leaves a form in the wrong state.

ParameterTypeDescription
checkedbooleanThe state you want.
exactbooleanRequire the whole text to match rather than a substring.
framestring'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame.
nthnumberWhich match to use when several qualify, 0-based.
rolestringNarrow the matches to this ARIA role.
selectorstringCSS selector. Descends into open shadow roots.
testidstringValue of a test attribute (data-testid and friends — see the testAttributes setting).
textstringVisible text on the control. Matches the innermost element that carries it, and follows a <label> to its input.
timeout_msnumberHow long to wait for the element to become actionable before giving up.

ui_upload

Attach one or more local files to a file input, without opening the operating system's file picker — which automation cannot drive at all. Give the absolute paths of files on the machine running Chrome.

ParameterTypeDescription
files *arrayAbsolute paths to the files to attach.
exactbooleanRequire the whole text to match rather than a substring.
framestring'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame.
nthnumberWhich match to use when several qualify, 0-based.
rolestringNarrow the matches to this ARIA role.
selectorstringCSS selector. Descends into open shadow roots.
testidstringValue of a test attribute (data-testid and friends — see the testAttributes setting).
textstringVisible text on the control. Matches the innermost element that carries it, and follows a <label> to its input.
timeout_msnumberHow long to wait for the element to become actionable before giving up.

ui_wait_for

Block until the page reaches a state: an element appears, disappears, becomes enabled, or some text shows up. This is the honest alternative to guessing a sleep — it returns as soon as the condition holds, and when it does not, it says what the page looked like instead of just timing out.

ParameterTypeDescription
contains_textstringAlso require the element to contain this text.
exactbooleanRequire the whole text to match rather than a substring.
framestring'main' (default) or a substring of a frame's origin/name. Single-page apps often render the screen you want in a child frame.
nthnumberWhich match to use when several qualify, 0-based.
rolestringNarrow the matches to this ARIA role.
selectorstringCSS selector. Descends into open shadow roots.
statestringWhat to wait for: 'visible' (default), 'hidden', 'enabled', 'detached', or 'stable' (present and no longer moving).
testidstringValue of a test attribute (data-testid and friends — see the testAttributes setting).
textstringVisible text on the control. Matches the innermost element that carries it, and follows a <label> to its input.
timeout_msnumberHow long to wait for the element to become actionable before giving up.

ui_inspect

List what can be interacted with on the current screen — buttons, links, inputs, selects and anything with an interactive ARIA role — with the target you would use to reach each one. Use it when a selector fails and you need to see what is really there. Far cheaper than dumping the DOM, and it names elements the way these tools expect them to be named.

ParameterTypeDescription
filterstringOnly controls whose text, id or name contains this.
framestring'main' (default) or a substring of a frame's origin/name.
kindstringRestrict to one family of control.
limitnumberMaximum controls to return.

page_screenshot

Capture what is on screen: the viewport, the whole scrollable page, one element, or an explicit rectangle. Name the element the same way as the ui_* tools — by CSS selector, by the text a person reads, or by test id — so snipping a region does not require working out coordinates. DevCDP's own badge and messages are hidden first, so the image shows the application and nothing else. Written to a file and returned as a path; pass inline:true when you need to look at it yourself, which costs a great deal of context.

ParameterTypeDescription
formatstringImage format. jpeg is far smaller for photographic content; png is exact.
full_pagebooleanCapture the whole scrollable page, not just the viewport. Ignored when a target or rect is given.
hide_overlaybooleanHide DevCDP's badge and messages for the capture. Turn off only when the overlay itself is what you are looking at.
inlinebooleanAlso return the image itself so you can see it. Expensive — a large capture can cost more context than every tool description combined.
max_widthnumberScale the capture down to at most this many pixels wide. Keeps a full-page shot to a sane size.
nthnumberWhich match to use when several qualify, 0-based.
qualitynumber1-100, for jpeg and webp only.
rectobjectExplicit page-coordinate region { x, y, width, height }. Overrides any element target.
save_tostringAbsolute path to write to. Defaults to a timestamped file in the screenshotDir setting.
selectorstringCSS selector of the element to capture. Descends into open shadow roots.
testidstringTest attribute value of the element to capture.
textstringVisible text of the element to capture.

source_list_scripts

List the JavaScript files loaded in the page, with size and whether each has a source map. This is indexed the moment DevCDP attaches, so it works on a page that was already open. Filter by URL substring to find the file you need before setting a breakpoint.

ParameterTypeDescription
filterstringOnly scripts whose URL contains this substring.
limitnumberMaximum scripts to return.
with_source_mapsbooleanOnly scripts that carry a source map.

source_get_script

Read the source Chrome actually loaded, by scriptId or URL substring, optionally a line range. Lines come back numbered so the numbers you quote to a breakpoint are the numbers you saw.

ParameterTypeDescription
end_linenumberLast line to return (1-based).
script_idstringscriptId from source_list_scripts.
start_linenumberFirst line to return (1-based).
urlstringURL substring identifying the script.

source_list_files

List the original source files recoverable from the page's source maps — the pre-bundling file tree. Use it to discover real file paths before calling source_get_file or setting a breakpoint on an original file.

ParameterTypeDescription
filterstringOnly paths containing this substring.
limitnumberMaximum paths to return.

source_get_file

Read an original pre-bundling source file via the page's source maps. Falls back to the loaded script when no map is available, and always tells you which of the two you got, so a bundle line is never mistaken for an original one.

ParameterTypeDescription
path *stringOriginal file path or a suffix of it, e.g. 'components/SaveButton.tsx'.
end_linenumberLast line to return (1-based).
start_linenumberFirst line to return (1-based).

debugger_set_breakpoint

Set a breakpoint and report honestly whether Chrome could bind it. Accepts either a loaded script URL (a substring is resolved to the exact script) or an original pre-bundling file path, which is translated through the source map. Set auto_resume:true when the action is being driven by an automation tool, so the page does not stay frozen and time that action out.

ParameterTypeDescription
line *number1-based line number, as shown by source_get_script / source_get_file.
url *stringScript URL, URL substring, or original source path.
auto_resumebooleanDefault true: capture scope/console/network on hit, then resume, so the page is never left frozen and the action that tripped it completes. Pass false to hold the pause for stepping; released after ma…
columnnumber1-based column, when several statements share a line.
conditionstringJavaScript condition — pause only when it is truthy, e.g. 'id === 42'.

debugger_set_breakpoint_at_function

Set a breakpoint on a function you can name, without knowing which file it lives in. Give any expression that evaluates to a function — 'app.saveOrder', 'MyClass.prototype.load', a framework helper — and DevCDP finds its definition and breaks at its first statement. Use this when you know what runs but not where it is defined; use debugger_set_breakpoint when you already have a file and line.

ParameterTypeDescription
function_expression *stringJavaScript evaluating to the function itself — no call parentheses. For example 'app.store.save', not 'app.store.save()'.
auto_resumebooleanDefault true: capture scope/console/network on hit, then resume, so the page is never left frozen and the action that tripped it completes. Pass false to hold the pause for stepping; released after ma…
conditionstringJavaScript condition — pause only when it is truthy, e.g. 'id === 42'.

debugger_list_breakpoints

List the breakpoints DevCDP has set, including whether each is actually bound to executable code. An unbound breakpoint will never fire — check here first when a breakpoint 'is not hitting'.

debugger_remove_breakpoint

Remove one breakpoint by its breakpointId. Use debugger_remove_all_breakpoints to clear them in one call.

ParameterTypeDescription
breakpoint_id *stringbreakpointId from debugger_set_breakpoint.

debugger_remove_all_breakpoints

Remove every breakpoint DevCDP set, and resume the page if it is currently paused. Call this before handing the browser back to a human, so they do not find a frozen app.

debugger_pause

Pause JavaScript execution at the next statement the page runs, and hold it so you can inspect and step. The page is frozen while held, so DevCDP releases it automatically after maxPauseMs if you have not resumed — no human ever has to press resume in Chrome.

debugger_resume

Resume execution and drop any hold. Breakpoints resume themselves by default, so this is only needed after an explicit pause, after stepping, or after a breakpoint set with auto_resume:false.

debugger_step_over

Step over from the current pause and stop at the next statement. Stepping implies you want the pause held, so it will not auto-resume between steps — but it is still released automatically after maxPauseMs if you stop. The new location and scope are available from debugger_get_state and debugger_get_scope once it settles.

debugger_step_into

Step into from the current pause and stop at the next statement. Stepping implies you want the pause held, so it will not auto-resume between steps — but it is still released automatically after maxPauseMs if you stop. The new location and scope are available from debugger_get_state and debugger_get_scope once it settles.

debugger_step_out

Step out from the current pause and stop at the next statement. Stepping implies you want the pause held, so it will not auto-resume between steps — but it is still released automatically after maxPauseMs if you stop. The new location and scope are available from debugger_get_state and debugger_get_scope once it settles.

debugger_get_state

Where execution is paused right now: the reason, and the full call stack with function names and 1-based file positions. Returns paused:false when the page is running.

debugger_get_scope

Read the variables in scope at a paused call frame, with objects and arrays expanded rather than printed as 'Object'. Includes `this`. Anything omitted for size is explicitly marked, so you never have to guess whether you saw the whole value.

ParameterTypeDescription
depthnumberHow many levels of nested objects to expand. 3 covers object → array → record.
frame_indexnumber0 is the innermost frame; see debugger_get_state for the stack.
include_globalbooleanInclude the global scope (thousands of properties).
max_propertiesnumberMaximum properties per object.

debugger_evaluate_at_frame

Evaluate an expression in the scope of a paused call frame, so local variables and closures are in scope. This is how you confirm a hypothesis with a real value rather than inferring one.

ParameterTypeDescription
expression *stringJavaScript evaluated in the frame's scope.
depthnumberHow deep to expand an object result.
frame_indexnumberWhich frame; 0 is innermost.

debugger_get_capture

Everything captured automatically at the last breakpoint hit — scope for the top frames, recent console output and recent network requests — in one call instead of four. Tells you whether the pause is still current or has already resumed, so a stale snapshot is never mistaken for live state.

notify_user

Show a short status line to the human, in the badge on the page you are debugging. This is the only channel the user actually sees — call it before a slow or surprising step so a frozen-looking app is explained. Keep it to a few words.

ParameterTypeDescription
action *stringWhat you are doing.
detail *stringShort human-readable detail, e.g. 'checking the save handler'.

session_start

Open a debugging session with a goal and an ordered list of steps, so progress is tracked and a failed step can fall back to asking the human. Use it for multi-step reproductions; a single-question investigation does not need it.

ParameterTypeDescription
goal *stringWhat you are trying to find out or prove.
steps *arrayOrdered steps, each { id, description, actor }. actor is 'agent', 'user' or 'either'.

session_step_done

Mark the current step complete with what you found, and advance. Returns the next step, or allDone when the plan is finished.

ParameterTypeDescription
resultstringWhat this step established — a real observed value, not a guess.

session_step_failed

Report that you cannot complete the current step yourself. Checks memory for a known recovery first, then tells you how to hand over to the human. Use it for anything automation genuinely cannot do — a login you have no credentials for, a challenge, a physical device.

ParameterTypeDescription
reason *stringWhy the step could not be completed.

session_ask_user

Ask the human to do something in the browser, and show the request in the on-page badge with a confirmation button. Returns immediately — poll session_poll_user_action for the outcome. Also relay the instruction in your reply, so it is visible whether or not they are looking at the browser window.

ParameterTypeDescription
instruction *stringExactly what the person should do, in one sentence.
wait_forstringWhat counts as done. 'confirmation' — the on-page button — is the only unambiguous one.

session_poll_user_action

Check whether the human has completed what session_ask_user requested. Returns acted:false while waiting. Poll at a human pace — a few seconds apart — rather than in a tight loop.

session_get_user_actions

What the human has done in the browser — clicks, typed values, chosen options, submissions — and the element each one touched. Works whether or not you asked, so unprompted help is still readable. Pass the cursor back for only what is new. Values are captured during a handover or takeover; sensitive fields stay redacted.

ParameterTypeDescription
cursornumberOnly actions newer than this seq. 0 for everything retained.
kindsarrayRestrict to these kinds, e.g. ['click','input_change','option_chosen'].
limitnumberMaximum actions to return.

session_get_activity

Unified timeline of everything observed in this session — console output, requests, navigations, dialogs, clicks, pauses and handovers, in order. Use it to reconstruct what happened when a step behaved unexpectedly.

ParameterTypeDescription
limitnumberMaximum entries.
sincestringISO timestamp lower bound.
typesarrayRestrict to these activity types.

session_get_status

Where the session plan stands: the goal, each step's status, which step is current, and whether a human handover is outstanding.

session_end

Close the session and return a summary. Does not detach — call devtools_disconnect to release the tab and clear breakpoints when you are finished with the browser entirely.

session_get_state

One snapshot of console output, network requests and DOM mutations together, instead of three separate calls. Pass the cursors back on the next call to get only what is new. This is the cheapest way to see the effect of an action.

ParameterTypeDescription
errors_onlybooleanRestrict console to warnings and errors, and network to failures.
log_cursornumberOnly console entries newer than this seq.
log_limitnumberMaximum console entries.
mut_limitnumberMaximum DOM mutation records.
net_filterstringOnly requests whose URL contains this.
net_limitnumberMaximum network requests.

memory_get

Look up what previous sessions learned about this app — failures and the recovery that worked. Returns short summaries so it is cheap to call at the start of a session; pass full:true or an id to read one in detail. Search it whenever a step fails, before asking the user for help.

ParameterTypeDescription
categorystringRestrict to one category.
fullbooleanReturn complete entries instead of summaries.
idstringReturn this single entry in full.
limitnumberMaximum entries to return.
querystringWords to match against category, failure, recovery, pattern or URL. Omit for the most recent.

memory_record

Record a failure and the recovery that worked, so a later session can skip the dead end. Call it after any user-assisted recovery or non-obvious workaround. All four fields are required and validated — a vague entry is worse than none, because it costs context on every future lookup.

ParameterTypeDescription
category *stringWhat kind of problem this was.
failure *stringWhat went wrong, concretely. e.g. 'Clicking Save did nothing because the form was still validating.'
pattern *stringThe reusable rule for next time. e.g. 'Wait for the validation spinner to clear before clicking Save.'
recovery *stringWhat actually resolved it, as steps someone could repeat.
sharedbooleanWrite to the shared team store instead of local, if one is configured.
url_patternstringURL substring this applies to, so it can be matched to a page later.

memory_import_legacy

One-off import of a v4 Markdown memory file into the current store, skipping the malformed entries v4's missing validation produced. Run once after upgrading, then delete the old file.

ParameterTypeDescription
path *stringFull path to the old memorymanagement.md.

app_discover

Ask the running page what it is: which UI libraries it uses, how it routes, how many frames it has, and its actual interactive surface — visible buttons, fields, grids and tabs with working selectors. Call this once before driving an unfamiliar app, instead of guessing selectors.

api_discover

Build a map of the backend the page actually talks to: endpoints grouped with ids collapsed, call counts, status codes, timings and failures — plus an OpenAPI/Swagger specification if the server publishes one at a standard path. Use it to understand the API surface, and to see at a glance which calls are failing.

ParameterTypeDescription
include_staticbooleanInclude scripts, styles, images and fonts, not just data calls.
probe_openapibooleanAlso try standard OpenAPI discovery paths on the page's origin.

docs_outline

List the documentation available under the docs root, with each file's headings, so you can see what the project documents before searching. A good first call when you do not yet know the app's vocabulary.

ParameterTypeDescription
max_filesnumberMaximum files to describe.
rootstringOverride the docs root for this call.

devcdp_settings

Show every DevCDP setting: its effective value, where that value came from (default, which settings file, or which environment variable), which files were searched and loaded, and any that failed to parse or were not recognised. Use it before changing configuration, and to check a change actually took effect.

ParameterTypeDescription
changed_onlybooleanOnly settings that are not at their default.
groupstringOnly one group of settings.

devcdp_settings_init

Write a settings file containing every option with its current value and an explanation, so it can be edited by hand. Refuses to overwrite an existing file unless you say so.

ParameterTypeDescription
overwritebooleanReplace the file if it already exists.
pathstringWhere to write it. Defaults to devcdp.settings.json in the install directory.