{"id":"fixed-width-records-slice","version":"1.0.0","description":"Slice selected fixed-width fields with explicit offsets, Unicode units, padding checks, and bounded diagnostics.","supported_operations":["slice fixed width records","project selected positional fields","extract raw fixed record columns","select named flat file spans","concatenate chosen fixed fields","cut utf8 records by declared offsets"],"unsupported_operations":["format or write fixed-width records","infer layouts or field widths","parse delimiter-separated CSV"],"semantics":["Offsets are zero-based and half-open; declared field extents must not overlap; code_point counts Unicode scalar values and utf8_byte counts encoded bytes.","Declared line_endings is enforced; any accepts LF, CRLF, or CR and normalizes them to records.","A field beyond a record reports record_too_short; UTF-8 byte boundaries inside a sequence report split_utf8_sequence.","left alignment removes trailing padding and requires no non-padding after padding; right alignment is symmetric; none preserves bytes/code points.","Input order determines record, field, and selected-field output order; ties retain declaration order.","At most 4,096 diagnostics are returned; discovering a 4,097th diagnostic throws limit_exceeded.","Pure bounded slicing without clock, locale, network, or randomness."],"limits":{"max_input_bytes":262144,"max_fields":64,"max_rows":4096,"max_diagnostics":4096,"max_output_bytes":1048576},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["text","fields","unit","line_endings","field_names"],"properties":{"text":{"type":"string","maxLength":262144},"fields":{"type":"array","minItems":1,"maxItems":64,"items":{"type":"object","additionalProperties":false,"required":["name","offset","width","alignment","padding"],"properties":{"name":{"type":"string","minLength":1,"maxLength":64},"offset":{"type":"integer","minimum":0,"maximum":262144},"width":{"type":"integer","minimum":1,"maximum":262144},"alignment":{"type":"string","enum":["left","right","none"]},"padding":{"type":"string","minLength":1,"maxLength":1}}}},"unit":{"type":"string","enum":["code_point","utf8_byte"]},"line_endings":{"type":"string","enum":["lf","crlf","any"]},"field_names":{"type":"array","minItems":1,"maxItems":64,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":64}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["reference_version","lines_in","records","errors"],"properties":{"reference_version":{"type":"string","const":"Python 3.13 str slicing; GNU Coreutils cut 9.7"},"lines_in":{"type":"integer","minimum":0,"maximum":4096},"records":{"type":"array","maxItems":4096,"items":{"type":"string","maxLength":262144}},"errors":{"type":"array","maxItems":4096,"items":{"type":"object","additionalProperties":false,"required":["line","field","reason"],"properties":{"line":{"type":"integer","minimum":1,"maximum":4096},"field":{"type":"string"},"reason":{"type":"string","enum":["record_too_short","invalid_padding","split_utf8_sequence"]}}}}}},"examples":[{"input":{"text":"ABCD","fields":[{"name":"a","offset":0,"width":2,"alignment":"none","padding":" "},{"name":"b","offset":2,"width":2,"alignment":"none","padding":" "}],"unit":"code_point","line_endings":"lf","field_names":["b"]},"output":{"reference_version":"Python 3.13 str slicing; GNU Coreutils cut 9.7","lines_in":1,"records":["CD"],"errors":[]}},{"input":{"text":"A\nB","fields":[{"name":"a","offset":0,"width":1,"alignment":"none","padding":" "}],"unit":"code_point","line_endings":"lf","field_names":["a"]},"output":{"reference_version":"Python 3.13 str slicing; GNU Coreutils cut 9.7","lines_in":2,"records":["A","B"],"errors":[]}}],"execute_url":"/v1/tools/fixed-width-records-slice/versions/1.0.0/execute"}