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

Function html

tests/utils.ts:232–251  ·  view source on GitHub ↗
(
  strings: TemplateStringsArray,
  ...values: unknown[]
)

Source from the content-addressed store, hash-verified

230}
231
232export function html(
233 strings: TemplateStringsArray,
234 ...values: unknown[]
235): string {
236 const bodyContent = strings.reduce((acc, str, i) => {
237 return acc + str + (values[i] || '');
238 }, '');
239
240 return `<!DOCTYPE html>
241<html lang="en">
242 <head>
243 <meta charset="UTF-8" />
244 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
245 <title>My test page</title>
246 </head>
247 <body>
248 ${bodyContent}
249 </body>
250</html>`;
251}
252
253export function stabilizeStructuredContent(content: unknown): unknown {
254 if (typeof content === 'string') {

Callers 15

testIncludesWebmcpToolsFunction · 0.85
McpContext.test.tsFile · 0.85
#handleMethod · 0.85
input.test.tsFile · 0.85
network.test.tsFile · 0.85
lighthouse.test.tsFile · 0.85
screenshot.test.tsFile · 0.85
script.test.tsFile · 0.85
emulation.test.tsFile · 0.85
pages.test.tsFile · 0.85

Calls

no outgoing calls

Tested by 2

testIncludesWebmcpToolsFunction · 0.68
setupWebMcpToolFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…