MCPcopy Index your code
hub / github.com/callstack/agent-device / readMcpOutputFormat

Function readMcpOutputFormat

src/mcp/command-tools.ts:151–157  ·  view source on GitHub ↗
(outputFormat: unknown)

Source from the content-addressed store, hash-verified

149}
150
151function readMcpOutputFormat(outputFormat: unknown): McpOutputFormat {
152 if (outputFormat === undefined) return 'optimized';
153 if (outputFormat !== 'optimized' && outputFormat !== 'json') {
154 throw new Error('Expected mcpOutputFormat to be "optimized" or "json".');
155 }
156 return outputFormat;
157}
158
159function stripMcpConfigFields(input: unknown): unknown {
160 if (!input || typeof input !== 'object' || Array.isArray(input)) return input;

Callers 1

readMcpToolConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected