> ## Documentation Index
> Fetch the complete documentation index at: https://browsertools.agentdesk.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools & Resources

> Every tool, prompt and resource BrowserTools MCP exposes

BrowserTools MCP exposes **16 tools**, **3 prompts** and **5 resource templates**.

Every tool declares an MCP output schema, so your client receives structured data rather than prose it has to parse. Read-only tools are annotated `readOnlyHint`, which lets clients auto-approve them safely.

Every tool that reads from a page accepts an optional `tabId`; the log tools also accept `allTabs`. See [working across several tabs](/quickstart#working-across-several-tabs).

***

## Reading the page

| Tool                 | What it does                                  | Notable arguments                                |
| -------------------- | --------------------------------------------- | ------------------------------------------------ |
| `getConsoleLogs`     | Console output from the current tab           | `keywords`, `limit`, `offset`                    |
| `getConsoleErrors`   | Error-level output and uncaught exceptions    | `keywords`, `limit`, `offset`                    |
| `getNetworkLogs`     | XHR and fetch requests with status and timing | `urlKeywords`, `bodyKeywords`, `limit`, `offset` |
| `getNetworkErrors`   | Only failed and 4xx/5xx requests              | `urlKeywords`, `bodyKeywords`, `limit`, `offset` |
| `getSelectedElement` | The element selected in the Elements panel    | `tabId`                                          |
| `getPageInfo`        | Which page the browser is currently on        | `tabId`                                          |
| `getBrowserStorage`  | localStorage, sessionStorage and cookies      | `kinds`, `includeValues`                         |

Results are returned **newest-first** and always report `total` alongside `returned`, so an agent can tell when it is only seeing part of the picture. When a read has to be cut short, the tool attaches a `resource_link` to the full history rather than silently dropping the rest.

<Warning>
  `getBrowserStorage` withholds values by default — it returns the key names and
  a count. Pass `includeValues: true` to read them. Cookie access additionally
  requires the optional permission you grant from the BrowserTools panel.
</Warning>

***

## Acting on the browser

| Tool             | What it does                                            | Notable arguments |
| ---------------- | ------------------------------------------------------- | ----------------- |
| `takeScreenshot` | Screenshot returned **as an image**, plus its file path | `name`, `tabId`   |
| `refreshBrowser` | Reloads the inspected tab                               | `tabId`           |
| `wipeLogs`       | Clears captured telemetry before a clean reproduction   | `tabId`           |

`takeScreenshot` returns `path`, `name`, `mimeType`, `bytes`, `imageIncluded`, `tabId` and `url`. Check `url` if you are not certain which page was captured.

<Info>
  Screenshots are held to a byte budget (3 MB by default). A capture that would
  exceed it is re-encoded as JPEG and, if still too large, downscaled — a dense
  viewport on a high-DPI display can otherwise run past 13 MB, which is more
  than a model's context can take. If an image still cannot fit, it is written
  to disk and the tool returns the path with `imageIncluded: false`; read it
  back through the screenshot resource.
</Info>

***

## Orientation

| Tool                  | What it does                                              |
| --------------------- | --------------------------------------------------------- |
| `getConnectionStatus` | Whether the extension is connected, and capture counts    |
| `listBrowserTabs`     | Every tab with DevTools open, and the id to address it by |

***

## Audits

| Tool                    | What it does                                          |
| ----------------------- | ----------------------------------------------------- |
| `runPerformanceAudit`   | Lighthouse performance audit with Core Web Vitals     |
| `runAccessibilityAudit` | Contrast, labels, semantics and screen-reader support |
| `runSEOAudit`           | Metadata, indexability and crawlability               |
| `runBestPracticesAudit` | Security, deprecated APIs and modern-web hygiene      |

All four take an optional `url` and default to the page currently open in the browser. Each launches a separate browser and takes up to a minute.

Reports are flat and consistently shaped across all four categories:

```jsonc theme={null}
{
  "category": "accessibility",
  "score": 72,                       // 0-100, or null
  "metadata": { "url": "...", "timestamp": "...", "lighthouseVersion": "13.4.1" },
  "summary": { "failed": 4, "passed": 1, "manual": 1, "informative": 1, "notApplicable": 1 },
  "issues": [                        // failing audits, heaviest first
    {
      "id": "color-contrast",
      "impact": "critical",          // critical | serious | moderate | minor
      "details": { "items": [...], "omittedItems": 0 }
    }
  ],
  "metrics": { }                     // Core Web Vitals, performance only
}
```

`omittedItems` reports how many detail rows were withheld to keep the payload small. Critical issues are never truncated, and the unabridged report is always available as a resource.

***

## Prompts

Guidance ships as MCP **prompts** rather than tools, so it costs nothing until you ask for it. In 1.x these were tools that returned static text on every request, which spent context whether you wanted it or not.

Pick them from your client's prompt menu — in Cursor and Claude Code, type `/`.

| Prompt           | What it does                                          |
| ---------------- | ----------------------------------------------------- |
| `debuggerMode`   | A systematic reproduce-then-diagnose loop             |
| `auditMode`      | A full audit pass turned into a prioritised work list |
| `nextjsSeoAudit` | An SEO audit with Next.js-specific checks             |

***

## Resources

Whole-history payloads are exposed as MCP resources rather than inlined, and tools link to them with `resource_link` so your agent fetches them only when it decides to.

| Resource                               | What it is                                                         |
| -------------------------------------- | ------------------------------------------------------------------ |
| `browser-tools://console/{tabId\|all}` | Every console entry, with no per-call size budget                  |
| `browser-tools://network/{tabId\|all}` | Every captured request, including bodies                           |
| `browser-tools://har/{tabId\|all}`     | The same traffic as a HAR 1.2 file                                 |
| `browser-tools://screenshot/{name}`    | A screenshot you captured earlier, by the name in its result       |
| `browser-tools://audit/{reportId}`     | The unabridged Lighthouse result, by the `reportId` in its summary |

Log tools attach a link when a read had to be cut short; network reads always offer the HAR; screenshots always link to the stored image, which is the only way to see one too large to inline. The 20 most recent full audit reports are kept under `audits/` in the screenshot directory.

<Tip>
  The HAR resource opens directly in Chrome's Network panel and in most HTTP
  tooling, so you can hand a captured session to something outside your agent.
</Tip>

***

## Exposing fewer tools

Sixteen tools is a lot of surface for a client that only needs a couple. Trim it with `--only` or `--exclude`:

```bash theme={null}
npx @agentdeskai/browser-tools-mcp --only getConsoleErrors,getNetworkErrors,takeScreenshot
```

See [configuration](/configuration) for the full list of flags.
