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

Function readResponseLevel

src/mcp/command-tools.ts:143–149  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

141}
142
143function readResponseLevel(value: unknown): ResponseLevel | undefined {
144 if (value === undefined) return undefined;
145 if (typeof value !== 'string' || !(RESPONSE_LEVELS as readonly string[]).includes(value)) {
146 throw new Error("Expected responseLevel to be one of 'digest', 'default', or 'full'.");
147 }
148 return value as ResponseLevel;
149}
150
151function readMcpOutputFormat(outputFormat: unknown): McpOutputFormat {
152 if (outputFormat === undefined) return 'optimized';

Callers 1

readClientConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected