Skip to content

MCP Tools Reference

All tools accept and return JSON. Every debug session tool requires session_id (returned by debug_launch). Browser tools use session_id returned by chrome_start.

Debug Tools

debug_launch

Launch a debug target process. Sets initial breakpoints and returns a session handle. The viewport shows source, locals, and call stack at each stop. Automatically detects test/web frameworks (pytest, django, flask, jest, mocha, gotest) to configure the debugger appropriately.

ParameterTypeRequiredDescription
commandstringNoCommand to execute, e.g. 'python app.py' or 'pytest tests/'. Required unless launch_config is provided. Test and web frameworks are auto-detected and configured for debugging.
languagestringNoSupported: python (.py), node/javascript/typescript/js/ts (.js .mjs .cjs .ts .mts .cts .tsx), go (.go), rust (.rs), java (.java), cpp (.c .cpp .cc .cxx .h .hpp), ruby (.rb), csharp (.cs), swift (.swift), kotlin (.kt). Omit to auto-detect from the file extension in the command.
frameworkstringNoOverride framework auto-detection. Known frameworks: pytest, django, flask, jest, mocha, gotest. Use 'none' to disable auto-detection.
breakpointsobject[]NoInitial breakpoints to set before execution begins. Note: breakpoints on non-executable lines (comments, blank lines, decorators) may be adjusted by the debugger to the nearest executable line.
cwdstringNoWorking directory for the debug target
envobjectNoAdditional environment variables for the debug target
viewport_configobjectNoOverride default viewport rendering parameters
stop_on_entrybooleanNoPause on the first executable line. Default: false
launch_configobjectNoUse a VS Code launch.json configuration instead of a command string

debug_stop

Terminate a debug session and kill the target process. This terminates (kills) the process — it does not detach. If the session was created with debug_attach, the attached process is also killed. Cleans up all session resources.

ParameterTypeRequiredDescription
session_idstringYesThe session to terminate

debug_status

Get the current status of a debug session. Returns viewport if stopped. Includes token stats, action count, and adapter capabilities.

ParameterTypeRequiredDescription
session_idstringYesThe session to query

debug_continue

Resume execution until the next breakpoint or program end. Returns the viewport at the next stop point.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
timeout_msnumberNoMax wait time for next stop in ms. Default: 30000
thread_idnumberNoThread ID to continue. Default: the thread that last stopped. Use debug_threads to list available threads.

debug_step

Step execution: 'over' steps over function calls, 'into' steps into them, 'out' steps out to the caller. Returns the viewport after stepping.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
direction"over" | "into" | "out"YesStep granularity: 'over' skips function calls, 'into' enters them, 'out' runs to parent frame
countnumberNoNumber of steps to take. Default: 1. Useful for stepping through loops without setting breakpoints.
thread_idnumberNoThread ID to step. Default: the thread that last stopped. Use debug_threads to list available threads.

debug_run_to

Run execution to a specific file and line number, then pause. If the target line is never reached, a timeout error is returned (controlled by timeout_ms). Unlike setting a breakpoint, this is a one-time temporary stop.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
filestringYesTarget file path
linenumberYesTarget line number
timeout_msnumberNoMax wait time in ms. Default: 30000

debug_set_breakpoints

Set breakpoints in a source file. REPLACES all existing breakpoints in that file. Supports conditions ('discount < 0'), hit counts ('>=100'), and logpoints ('discount={discount}'). Logpoints log a message when hit instead of breaking. Not all debuggers support logpoints — if unsupported, the breakpoint will be set as a regular breakpoint. Note: breakpoints on non-executable lines may be adjusted by the debugger.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
filestringYesSource file path
breakpointsobject[]YesBreakpoint definitions. REPLACES all existing breakpoints in this file. To add a breakpoint without removing existing ones, include them all.

debug_set_exception_breakpoints

Configure exception breakpoint filters. Controls which exceptions pause execution. Python filters: 'raised' (all exceptions), 'uncaught' (unhandled only), 'userUnhandled'. Node.js filters: 'all' (all exceptions), 'uncaught' (unhandled only). Go/Delve: 'panic' (runtime panics). Use debug_status after launch to see exact available filters for the current adapter.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
filtersstring[]YesException filter IDs. Python: 'raised' (all exceptions), 'uncaught' (unhandled only), 'userUnhandled'. Node.js: 'all' (all exceptions), 'uncaught' (unhandled only). Go/Delve: 'panic' (runtime panics). Use debug_status to see available filters for the current adapter.

debug_list_breakpoints

List all breakpoints currently set in the debug session.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session

debug_evaluate

Evaluate an expression in the current debug context. Can access variables, call functions, and inspect nested objects.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
expressionstringYesExpression to evaluate in the debugee's context. E.g., 'cart.items[0].dict', 'len(results)', 'discount < 0'. Can call methods and access nested attributes.
frame_indexnumberNoStack frame context: 0 = current frame (default), 1 = caller, 2 = caller's caller, etc.
max_depthnumberNoObject expansion depth for the result. Default: 2

debug_variables

Get variables from a specific scope and stack frame.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
scope"local" | "global" | "closure" | "all"NoVariable scope to retrieve. Default: 'local'. Note: 'closure' is Node.js only — not available in Python or Go.
frame_indexnumberNoStack frame context (0 = current). Default: 0
filterstringNoRegex filter on variable names. E.g., '^user' to show only user-prefixed vars
max_depthnumberNoObject expansion depth. Default: 1

debug_stack_trace

Get the current call stack showing the execution path to the current point.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
max_framesnumberNoMaximum frames to return. Default: 20
include_sourcebooleanNoInclude source context around each frame. Default: false

debug_source

Read source code from a file with line numbers. Use this instead of a plain file read when you need line numbers that match the debugger's view, or to read source-mapped or virtual files that don't exist at a literal path on disk.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
filestringYesSource file path
start_linenumberNoStart of range. Default: 1
end_linenumberNoEnd of range. Default: start_line + 40

debug_watch

Manage watch expressions. Watched expressions are automatically evaluated and shown in every viewport snapshot.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
action"add" | "remove"NoWhether to add or remove expressions. Default: 'add'
expressionsstring[]YesExpressions to add or remove from the watch list. E.g., ['len(cart.items)', 'user.tier', 'total > 0']

debug_action_log

Get the investigation log for the current session. Shows actions taken, key observations (unexpected values, variable changes), and cumulative viewport token consumption. Older entries are automatically compressed into summaries. Use this to reconstruct your reasoning chain without re-reading old viewports.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
format"summary" | "detailed"NoLevel of detail. 'summary' compresses older entries. 'detailed' includes timestamps and full observations. Default: 'summary'

debug_output

Get captured stdout/stderr output from the debug target.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session
stream"stdout" | "stderr" | "both"NoWhich output stream. Default: 'both'
since_actionnumberNoOnly show output captured since action N. Default: 0 (all)

debug_attach

Attach to an already-running process for debugging. Use when the target is a long-running service (web server, daemon) or when you need to debug a process you didn't launch. The process must already be listening for a debugger: python needs 'python -m debugpy --listen 5678 app.py', node/typescript needs '--inspect' flag (node --inspect app.js), go attaches by PID via Delve.

ParameterTypeRequiredDescription
languagestringYesLanguage of the target process. Required for attach (no command to infer from). Supported: python (.py), node/javascript/typescript/js/ts (.js .mjs .cjs .ts .mts .cts .tsx), go (.go), rust (.rs), java (.java), cpp (.c .cpp .cc .cxx .h .hpp), ruby (.rb), csharp (.cs), swift (.swift), kotlin (.kt). Omit to auto-detect from the file extension in the command.
pidnumberNoProcess ID to attach to (Go/Delve).
portnumberNoDebug server port. Python debugpy default: 5678. Node.js inspector default: 9229.
hoststringNoDebug server host. Default: '127.0.0.1'
cwdstringNoWorking directory for source file resolution
breakpointsobject[]NoBreakpoints to set after attaching
viewport_configobjectNoOverride default viewport rendering parameters

debug_threads

List all threads in the debug session. Useful for multi-threaded programs (Go goroutines, Python threads). Shows thread IDs and names. Use thread_id on step/continue/evaluate to operate on a specific thread.

ParameterTypeRequiredDescription
session_idstringYesThe active debug session

Browser & Session Tools

chrome_start

Launch Chrome and start recording browser events (network, console, user input). By default, launches a new isolated Chrome instance — no conflict with an existing Chrome window. Use profile='krometrail' (or any name) to get a fully isolated Chrome that won't collide with your regular browser. Returns a session info summary once Chrome is ready. Use chrome_status to check recording state, chrome_mark to place markers, chrome_stop to end the session. After stopping, use session_list and session_overview to investigate what was recorded. Use attach=true only if Chrome was already launched with --remote-debugging-port=9222.

ParameterTypeRequiredDescription
urlstringNoURL to open when launching Chrome
portnumberNoChrome remote debugging port. Default: 9222
profilestringNoChrome profile name — creates an isolated user-data-dir under ~/.krometrail/chrome-profiles/<name>. Each profile has its own cookies, storage, and login state. Use this to avoid conflicts with an already-running Chrome. Example: 'krometrail'
attachbooleanNoAttach to an already-running Chrome instance (don't launch). Requires Chrome to have been started with --remote-debugging-port=9222. If Chrome is running normally without that flag, use profile instead to launch an isolated instance.
all_tabsbooleanNoRecord all browser tabs. Default: first/active tab only
tab_filterstringNoGlob pattern — record only tabs whose URL matches, e.g. '/app/'
screenshot_interval_msnumberNoPeriodic screenshot interval in ms. 0 or omit to disable. Example: 5000 for a screenshot every 5s
framework_stateboolean | "react" | "vue" | "solid" | "svelte"[]NoEnable framework state observation. true = auto-detect all supported frameworks. ["react"] = only React. ["react", "vue"] = both. Default: false (disabled).

chrome_status

Show the current Chrome recording status — whether Chrome is active, how many events and markers have been captured, and which tabs are being recorded.

No parameters.

chrome_mark

Place a named marker in the Chrome recording buffer at the current moment. Markers let you annotate significant events (e.g. 'submitted form', 'saw error') so you can quickly find them later with session_overview or session_search using around_marker.

ParameterTypeRequiredDescription
labelstringNoLabel for the marker, e.g. 'form submitted' or 'error appeared'. Descriptive labels help you find this marker later with around_marker.

chrome_stop

Stop the active Chrome recording session and flush all buffered events to the database. After stopping, use session_list to find the recorded session and session_overview to investigate it.

ParameterTypeRequiredDescription
close_chromebooleanNoAlso close the Chrome browser. Default: false

session_list

List recorded browser sessions. Use this to find sessions to investigate. Filter by time, URL, or whether the session has markers/errors.

ParameterTypeRequiredDescription
afterstringNoISO timestamp — only sessions after this time
beforestringNoISO timestamp — only sessions before this time
url_containsstringNoFilter by URL pattern
has_markersbooleanNoOnly sessions with user-placed markers
has_errorsbooleanNoOnly sessions with captured errors (4xx/5xx, exceptions, console errors)
limitnumberNoMax results. Default: 10

session_overview

Get a structured overview of a recorded browser session — navigation timeline, markers, errors, and network summary. Use this to understand what happened before diving into details. Focus on a specific marker with around_marker.

ParameterTypeRequiredDescription
session_idstringYesSession ID from session_list
include"timeline" | "markers" | "errors" | "network_summary" | "framework"[]NoWhat to include. Default: all
around_markerstringNoCenter overview on this marker ID
time_rangeobjectNoFocus on a specific time window
token_budgetnumberNoMax tokens for the response. Default: 3000

Search recorded browser session events. Supports natural language search (uses FTS5) and structured filters (event type, status code, time range, framework, component, pattern). Use natural language for exploratory search, structured filters for precise queries.

ParameterTypeRequiredDescription
session_idstringYesSession ID
querystringNoNatural language search query, e.g. 'validation error' or 'phone format'
event_types"navigation" | "network_request" | "network_response" | "console" | "page_error" | "user_input" | "websocket" | "performance" | "marker" | "framework_detect" | "framework_state" | "framework_error"[]NoFilter by event type
status_codesnumber[]NoFilter network responses by HTTP status code, e.g. [400, 422, 500]
time_rangeobjectNoFilter by time window
around_markerstringNoCenter search around this marker ID (±120s before, +30s after)
url_patternstringNoGlob pattern to filter by URL in summary, e.g. '/api/patients'
console_levelsstring[]NoFilter console events by level, e.g. ['error', 'warn']
contains_textstringNoCase-insensitive substring match on event summary
limitnumberNoMax results. Default: 10
token_budgetnumberNoMax tokens for the response. Default: 2000
framework"react" | "vue" | "solid" | "svelte"NoFilter by framework. Automatically narrows to framework event types.
componentstringNoFilter by component name (substring match), e.g. 'UserProfile'
patternstringNoFilter by bug pattern name, e.g. 'stale_closure', 'infinite_rerender'

session_inspect

Deep-dive into a specific event or moment in a recorded browser session. Returns full event detail, network request/response bodies, surrounding events, and nearest screenshot. This is the primary evidence-gathering tool. If multiple of event_id, marker_id, and timestamp are provided, precedence is: event_id > marker_id > timestamp.

ParameterTypeRequiredDescription
session_idstringYesSession ID
event_idstringNoSpecific event ID (from session_search results)
marker_idstringNoJump to a marker
timestampstringNoISO timestamp — inspect the moment closest to this time
include"surrounding_events" | "network_body" | "screenshot" | "form_state" | "console_context"[]NoWhat to include alongside the event detail. Default: all
context_windownumberNoSeconds of surrounding events to include. Default: 5
token_budgetnumberNoMax tokens for the response. Default: 3000

session_diff

Compare two moments in a recorded browser session. Shows what changed between two timestamps or events: URL, form state, storage, new console messages, and network activity. Useful for understanding what happened between page load and an error.

ParameterTypeRequiredDescription
session_idstringYesSession ID
fromstringYesFirst moment — timestamp (ISO or HH:MM:SS) or event ID
tostringYesSecond moment — timestamp (ISO or HH:MM:SS) or event ID
include"form_state" | "storage" | "url" | "console_new" | "network_new" | "framework_state"[]NoWhat to diff. Default: form_state, storage, url, console_new, network_new (framework_state must be explicitly requested)
token_budgetnumberNoMax tokens. Default: 2000

session_replay_context

Generate a reproduction context from a recorded browser session. Outputs reproduction steps, test scaffolds (Playwright or Cypress), or a summary. Use this to create actionable artifacts from investigation findings.

ParameterTypeRequiredDescription
session_idstringYesSession ID
around_markerstringNoFocus on events around this marker
time_rangeobjectNoFocus on a specific time window
format"summary" | "reproduction_steps" | "test_scaffold"YesOutput format: 'summary' for overview, 'reproduction_steps' for step-by-step, 'test_scaffold' for automated test code
test_framework"playwright" | "cypress"NoTest framework for scaffold generation. Default: playwright

Released under the MIT License.