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

Function getTextContent

tests/utils.ts:39–46  ·  view source on GitHub ↗
(
  content: CallToolResult['content'][number],
)

Source from the content-addressed store, hash-verified

37}
38
39export function getTextContent(
40 content: CallToolResult['content'][number],
41): string {
42 if (content.type === 'text') {
43 return content.text;
44 }
45 throw new Error(`Expected text content but got ${content.type}`);
46}
47
48export function getImageContent(content: CallToolResult['content'][number]): {
49 data: string;

Callers 7

testIncludesWebmcpToolsFunction · 0.85
input.test.tsFile · 0.85
network.test.tsFile · 0.85
console.test.tsFile · 0.85
extensions.test.tsFile · 0.85

Calls

no outgoing calls

Tested by 2

testIncludesWebmcpToolsFunction · 0.68