infer_multi_target_schema
Infer unified schemas from JSON or JSONL samples and generate TypeScript, Zod, Go, PostgreSQL DDL, and JSON Schema outputs for consistent data modeling.
Instructions
Infers unified schemas across single JSON payloads or 1,000+ .jsonl rows (optional ?, | null, UUID, ISO timestamps, and string | bigint hazards) into TypeScript, Zod v3, Go struct, PostgreSQL DDL, and JSON Schema Draft 2020-12.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "infer_multi_target_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targets | No | Optional subset of codegen targets to return; when omitted, all five targets (TypeScript, Zod, Go, PostgreSQL, JSON Schema) are returned. | |
| filePath | No | Optional local file path to a .json or .jsonl sample file on disk when payloadContent is omitted. | |
| rootName | No | Root PascalCase type or struct identifier emitted in TypeScript, Zod v3, Go, and JSON Schema (defaults to "RootRecord"). | |
| tableName | No | Target snake_case SQL table identifier emitted in PostgreSQL CREATE TABLE DDL (defaults to "json_records"). | |
| payloadContent | No | Raw JSON object, JSON array, or multi-line .jsonl sample stream used for union schema and type inference. | |
| expandUnescaped | No | When true (default), promotes nested stringified JSON log strings into structured object types instead of opaque strings. |