MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getFormatDescription

Function getFormatDescription

src/utils/mcpOutputStorage.ts:16–28  ·  view source on GitHub ↗
(
  type: MCPResultType,
  schema?: unknown,
)

Source from the content-addressed store, hash-verified

14 * Generates a format description string based on the MCP result type and schema.
15 */
16export function getFormatDescription(
17 type: MCPResultType,
18 schema?: unknown,
19): string {
20 switch (type) {
21 case 'toolResult':
22 return 'Plain text'
23 case 'structuredContent':
24 return schema ? `JSON with schema: ${schema}` : 'JSON'
25 case 'contentArray':
26 return schema ? `JSON array with schema: ${schema}` : 'JSON array'
27 }
28}
29
30/**
31 * Generates instruction text for Claude to read from a saved output file.

Callers 1

processMCPResultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected