{"id":"csv-dialect-format","version":"1.0.0","description":"Format string rows as CSV for an explicit dialect, quoting a one-field empty record when it can.","supported_operations":["format string rows with an explicit csv dialect","write rfc 4180 quoted csv fields","serialize string cells with a chosen delimiter","emit a quoted empty csv field","format quote-none csv or reject it","render csv text from string records","כתיבת שורות לטקסט מופרד"],"unsupported_operations":["write an excel workbook","omit the final record separator","emit an unquoted one-field empty record"],"semantics":["Every record, including the last, ends with the dialect record separator. quoting is minimal, all, or none. minimal quotes a field that contains the delimiter, the quote, CR, or LF. all quotes every field. none never quotes.","A single empty field is written as a quoted empty field plus the separator, for example \"\" followed by LF. That text parses back to [[\"\"]]. When quote is none or quoting is none, that record is unsupported_input with reason empty_field_needs_quote. Two empty fields stay a bare comma.","escape double repeats the quote inside quotes. escape backslash prefixes a backslash to the delimiter, breaks, the quote, and itself when those characters must be escaped. A field that still cannot be represented is unsupported_input, not a best-effort line.","header present writes the header array first and requires data rows of that width. Duplicate or empty header names are invalid_input. header absent rejects a header array. Cells stay strings: no trim and no Unicode normalization.","Dialect key order is delimiter, quote, escape, record_separator, header. Records and fields keep input order. The same input always yields the same csv string."],"limits":{"max_input_bytes":4096,"max_records":64,"max_fields":8,"max_field_bytes":256,"max_csv_bytes":1024,"max_output_bytes":4096,"max_depth":8},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["dialect","quoting","rows"],"properties":{"dialect":{"type":"object","additionalProperties":false,"required":["delimiter","quote","escape","record_separator","header"],"properties":{"delimiter":{"type":"string","minLength":1,"maxLength":1},"quote":{"type":"string","enum":["\"","|","none"]},"escape":{"type":"string","enum":["double","backslash","none"]},"record_separator":{"type":"string","enum":["\n","\r\n","\r"]},"header":{"type":"string","enum":["present","absent"]}}},"quoting":{"type":"string","enum":["minimal","all","none"]},"header":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string","minLength":1,"maxLength":256}},"rows":{"type":"array","maxItems":64,"items":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string","maxLength":256}}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["csv"],"properties":{"csv":{"type":"string","minLength":1,"maxLength":1024}}},"examples":[{"input":{"dialect":{"delimiter":",","quote":"\"","escape":"double","record_separator":"\r\n","header":"absent"},"quoting":"minimal","rows":[["aaa","bbb","ccc"],["zzz","yyy","xxx"]]},"output":{"csv":"aaa,bbb,ccc\r\nzzz,yyy,xxx\r\n"}},{"input":{"dialect":{"delimiter":",","quote":"\"","escape":"double","record_separator":"\n","header":"absent"},"quoting":"minimal","rows":[[""]]},"output":{"csv":"\"\"\n"}},{"input":{"dialect":{"delimiter":",","quote":"\"","escape":"double","record_separator":"\n","header":"absent"},"quoting":"all","rows":[["a","b"]]},"output":{"csv":"\"a\",\"b\"\n"}}],"execute_url":"/v1/tools/csv-dialect-format/versions/1.0.0/execute"}