MCPcopy
hub / github.com/TanStack/ai / validateClientToolOutput

Method validateClientToolOutput

packages/ai-client/src/chat-client.ts:1246–1255  ·  view source on GitHub ↗
(
    clientTool: AnyClientTool,
    output: any,
  )

Source from the content-addressed store, hash-verified

1244 }
1245
1246 private validateClientToolOutput(
1247 clientTool: AnyClientTool,
1248 output: any,
1249 ): any {
1250 if (clientTool.outputSchema && isStandardSchema(clientTool.outputSchema)) {
1251 return parseWithStandardSchema(clientTool.outputSchema, output)
1252 }
1253
1254 return output
1255 }
1256
1257 /**
1258 * Respond to a tool approval request

Callers 1

Calls 2

isStandardSchemaFunction · 0.85
parseWithStandardSchemaFunction · 0.85

Tested by

no test coverage detected