MCPcopy Create free account
hub / github.com/TanStack/ai / isContentPartArray

Function isContentPartArray

packages/ai/src/utilities/tool-result.ts:42–46  ·  view source on GitHub ↗
(
  value: unknown,
)

Source from the content-addressed store, hash-verified

40 * footgun narrow.
41 */
42export function isContentPartArray(
43 value: unknown,
44): value is Array<ContentPart> {
45 return Array.isArray(value) && value.length > 0 && value.every(isContentPart)
46}
47
48/**
49 * Normalize a tool's return value for transport:

Callers 2

normalizeToolResultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected