Toml10 validate
toml10-validate · version 1.0.0 · Structured formats · free, no key needed
Check a TOML 1.0 document and locate the first structural error.
Use when you need to: check toml 1.0 document structure · find toml duplicate keys and headers · reject extension of a closed inline table.
Decide before calling
Read the versioned contract and the supported scope below. Reuse toml10-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 toml10-validate@1.0.0 for check toml 1.0 document structure. 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
- check toml 1.0 document structure
- find toml duplicate keys and headers
- reject extension of a closed inline table
- toml 1.0 collision and type conflicts
- locate a toml 1.0 syntax error
- report toml inline table closure failures
Not supported
- repair invalid toml
- convert a toml document to json
- check cargo or pyproject schema rules
Behavior
- A well-typed TOML failure returns {valid:false, reason, line, column, message}. It does not throw.
- Wrong types, missing or unknown fields, and lone surrogates throw invalid_input. Byte, depth, and node limits throw limit_exceeded.
- A valid document returns valid true, null reason, line, and column, and an empty message. The first error wins. Lines and columns are 1-based, and a column counts Unicode code points.
- The reason is one of syntax, duplicate_key, closed_inline_table, type_conflict, dotted_extends_header, out_of_range, invalid_number, invalid_datetime, invalid_escape, control_character.
- Validation does not repair the text and does not convert it to JSON. The same text always returns the same report.
Input
text(string, required)
Output
valid(boolean, required)reason(string or null, required)line(integer or null, required): min 1column(integer or null, required): min 1message(string, required)
Limits
- max input bytes: 4096
- max output bytes: 16384
- max depth: 8
- max nodes: 48
Example
Request input:
{
"text": "bool1 = true\n"
}
Response:
{
"result": {
"valid": true,
"reason": null,
"line": null,
"column": null,
"message": ""
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "toml10-validate",
"version": "1.0.0",
"input": {
"text": "bool1 = true\n"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/toml10-validate/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"text":"bool1 = true\n"}'
The machine-readable contract is at /v1/tools/toml10-validate/versions/1.0.0.
CLI
node cli.mjs run toml10-validate 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Toml10 parse: Parse TOML 1.0 into typed nodes with exact int64, floats, and datetimes.
- INI win validate: Check initialization-file text against the pinned Windows profile grammar.
- Toml10 format: Emit canonical TOML 1.0 source from a typed document tree.
- Xpath10 evaluate: Evaluate an XPath 1.0 value expression and return its type with an exact string, number, or boolean token.
- Systemd .env parse: Parse a systemd EnvironmentFile into assignments, a last-wins map, and duplicate keys.
- XML exc c14n canonicalize: Exclusive XML Canonicalization 1.0 of a whole document, with an optional inclusive prefix list.