MCPcopy
hub / github.com/ChromeDevTools/chrome-devtools-mcp / createStructuredPage

Function createStructuredPage

src/McpResponse.ts:1420–1443  ·  view source on GitHub ↗
(
  page: Page,
  context: McpContext,
  rawTitle: string,
)

Source from the content-addressed store, hash-verified

1418}
1419
1420function createStructuredPage(
1421 page: Page,
1422 context: McpContext,
1423 rawTitle: string,
1424) {
1425 const isolatedContextName = context.getIsolatedContextName(page);
1426 const title = truncateTitle(rawTitle);
1427 const entry: {
1428 id: number | undefined;
1429 url: string;
1430 title: string;
1431 selected: boolean;
1432 isolatedContext?: string;
1433 } = {
1434 id: context.getPageId(page),
1435 url: page.url(),
1436 title,
1437 selected: context.isPageSelected(page),
1438 };
1439 if (isolatedContextName) {
1440 entry.isolatedContext = isolatedContextName;
1441 }
1442 return entry;
1443}

Callers 1

formatMethod · 0.85

Calls 5

truncateTitleFunction · 0.85
getPageIdMethod · 0.80
urlMethod · 0.80
isPageSelectedMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…