Skip to main content
Glama

Chrome DevTools MCP

Official
parse.test.ts1.35 kB
/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import {describe, it} from 'node:test'; import assert from 'node:assert'; import { getTraceSummary, parseRawTraceBuffer, } from '../../src/trace-processing/parse.js'; import {loadTraceAsBuffer} from './fixtures/load.js'; describe('Trace parsing', async () => { it('can parse a Uint8Array from Tracing.stop())', async () => { const rawData = loadTraceAsBuffer('basic-trace.json.gz'); const result = await parseRawTraceBuffer(rawData); if ('error' in result) { assert.fail(`Unexpected parse failure: ${result.error}`); } assert.ok(result?.parsedTrace); assert.ok(result?.insights); }); it('can format results of a trace', async t => { const rawData = loadTraceAsBuffer('web-dev-with-commit.json.gz'); const result = await parseRawTraceBuffer(rawData); if ('error' in result) { assert.fail(`Unexpected parse failure: ${result.error}`); } assert.ok(result?.parsedTrace); assert.ok(result?.insights); const output = getTraceSummary(result); t.assert.snapshot?.(output); }); it('will return a message if there is an error', async () => { const result = await parseRawTraceBuffer(undefined); assert.deepEqual(result, { error: 'No buffer was provided.', }); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChromeDevTools/chrome-devtools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server