π§ How it Works
You do not call these tools directly. Your AI Agent (Cursor/Claude) automatically selects the right tool based on your natural language request.- You say: βWhy is the login failing?β
- Agent thinks: I need to check network requests and console errors.
- Agent calls:
trace_get_network_failed()andtrace_get_console_errors().
π£οΈ Prompting Guide
To get the best results, guide the Agent towards specific domains:| Goal | Prompt to use | Triggered Tools |
|---|---|---|
| Fix a Crash | βAnalyze the console for recent errors and suggested fixes.β | trace_get_console_errors, trace_suggest_fix |
| Debug API | βWhy did the last request fail? Check headers.β | trace_get_network_failed, trace_get_request_headers |
| Fix UI | βInspect the submit button. Why is it hidden?β | trace_inspect_element, trace_analyze_visibility |
| Test Flow | βClick the signup button and fill the form.β | trace_click, trace_type |
π Tool Definitions
trace_p(prompt)
Deep Debug. Runs a multi-step AI loop to solve a complex problem.
π₯οΈ Console & Errors
trace_get_console_errors: List all JS exceptions.trace_get_error_groups: Group errors by stack trace (reduces noise).trace_suggest_fix: AI-powered fix suggestion for a specific error.trace_explain_call_stack: Natural language explanation of a crash.
π Network
trace_get_network_failed: List 4xx/5xx requests.trace_get_network_summary: High-level traffic stats.trace_get_request_headers(requestId): Inspect headers (Auth, CORS).trace_get_response_body(requestId): Read the JSON/HTML response.trace_replay_request(requestId): Retry a failed request to test a fix.trace_get_timing_breakdown: Latency analysis (TTFB, DNS).
π DOM & UI
trace_inspect_element(selector): Get computed styles and visibility.trace_get_dom_tree: Snapshot of the current page structure.trace_check_accessibility: Run an a11y audit.trace_analyze_visibility: Find out why an element is hidden.trace_edit_element_style: Live CSS patching.
π±οΈ Interaction (Active)
trace_click(selector): Simulate user click.trace_type(selector, text): Fill input fields.trace_hover: Trigger hover states.trace_scroll: Move the viewport.trace_wait_for(selector): Wait for async loading to finish.
π§ Application State
trace_get_cookies: List/filter cookies.trace_get_local_storage: Read local storage keys.trace_get_service_workers: Debug PWA workers.trace_clear_storage: Wipe state for a fresh test.
πΎ Code & Source
trace_read_file(path): Read local source code.trace_git_blame(path, line): Find who changed code recently.trace_search_code(query): Grep search the project.trace_get_error_context: Auto-fetch code around a stack trace.
β‘ Performance
trace_start_cpu_profile: Record a performance profile.trace_take_heap_snapshot: Debug memory leaks.trace_get_performance_metrics: LCP, CLS, and Web Vitals.

