MCPcopy Index your code
hub / github.com/TanStack/ai / parseCallResponse

Function parseCallResponse

testing/e2e/tests/mcp-apps.spec.ts:69–80  ·  view source on GitHub ↗
(body: string)

Source from the content-addressed store, hash-verified

67}
68
69function parseCallResponse(body: string): CallHandlerResponse {
70 const parsed: unknown = JSON.parse(body)
71 if (
72 typeof parsed !== 'object' ||
73 parsed === null ||
74 !('ok' in parsed) ||
75 typeof parsed.ok !== 'boolean'
76 ) {
77 throw new Error(`expected a { ok: boolean } response, got: ${body}`)
78 }
79 return parsed
80}
81
82test.describe('mcp-apps — data + interactive planes', () => {
83 test('STATIC: a ui-linked MCP tool emits a ui-resource part over the stream', async ({

Callers 1

mcp-apps.spec.tsFile · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected