Function
getFormatDescription
(
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 | */ |
| 16 | export 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. |
Tested by
no test coverage detected