Fixed width records validate
fixed-width-records-validate · version 1.0.0 · Structured formats · free, no key needed
Validate fixed-width records with explicit offsets, widths, alignment, padding, Unicode units, and bounded diagnostics.
Use when you need to: validate fixed width records · audit positional row lengths · detect invalid field padding.
Decide before calling
Read the versioned contract and the supported scope below. Reuse fixed-width-records-validate@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use fixed-width-records-validate@1.0.0 for validate fixed width records. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- validate fixed width records
- audit positional row lengths
- detect invalid field padding
- check utf8 column boundaries
- verify legacy layout conformance
- report fixed record field errors
Not supported
- format or write fixed-width records
- infer layouts or field widths
- parse delimiter-separated CSV
Behavior
- 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.
Input
text(string, required): max length 262144fields(array of object, required): min items 1; max items 64unit(one of "code_point", "utf8_byte", required)line_endings(one of "lf", "crlf", "any", required)
Output
reference_version(constant "Python 3.13 str slicing; GNU Coreutils cut 9.7", required)valid(boolean, required)lines_in(integer, required): min 0; max 4096errors(array of object, required): max items 4096
Limits
- max input bytes: 262144
- max fields: 64
- max rows: 4096
- max diagnostics: 4096
- max output bytes: 1048576
Example
Request input:
{
"text": "A ",
"fields": [
{
"name": "a",
"offset": 0,
"width": 2,
"alignment": "left",
"padding": " "
}
],
"unit": "code_point",
"line_endings": "lf"
}
Response:
{
"result": {
"reference_version": "Python 3.13 str slicing; GNU Coreutils cut 9.7",
"valid": true,
"lines_in": 1,
"errors": []
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "fixed-width-records-validate",
"version": "1.0.0",
"input": {
"text": "A ",
"fields": [
{
"name": "a",
"offset": 0,
"width": 2,
"alignment": "left",
"padding": " "
}
],
"unit": "code_point",
"line_endings": "lf"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/fixed-width-records-validate/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"text":"A ","fields":[{"name":"a","offset":0,"width":2,"alignment":"left","padding":" "}],"unit":"code_point","line_endings":"lf"}'
The machine-readable contract is at /v1/tools/fixed-width-records-validate/versions/1.0.0.
CLI
node cli.mjs run fixed-width-records-validate 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Fixed width records parse: Parse fixed-width records with explicit offsets, widths, alignment, padding, Unicode units, and bounded diagnostics.
- Fixed width records slice: Slice selected fixed-width fields with explicit offsets, Unicode units, padding checks, and bounded diagnostics.
- INI win validate: Check initialization-file text against the pinned Windows profile grammar.
- Asn1 der validate: Check one ASN.1 DER value for canonical TLV structure and return a reason.
- Toml10 validate: Check a TOML 1.0 document and locate the first structural error.
- XML exc c14n validate: Check whether XML is already in Exclusive XML Canonicalization 1.0 form.