MCPcopy Create free account
hub / github.com/ScriptedAlchemy/devtools-debugger-mcp / mcpContent

Function mcpContent

src/index.ts:38–43  ·  view source on GitHub ↗
(payload: unknown, format?: OutputFormat)

Source from the content-addressed store, hash-verified

36}
37
38function mcpContent(payload: unknown, format?: OutputFormat) {
39 // MCP spec supports text/image/resource. We encode structured data as a single text block.
40 // Default is JSON (minified) to reduce tokens; pass format: 'text' for pretty 2-space JSON.
41 const text = format === 'text' ? JSON.stringify(payload, null, 2) : JSON.stringify(payload);
42 return [{ type: 'text', text } as any];
43}
44
45
46// Log when server starts

Callers 1

index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected