# Toml10 parse

`toml10-parse` · version 1.0.0 · Structured formats · free, no key needed

Parse TOML 1.0 into typed nodes with exact int64, floats, and datetimes.

**Use when you need to: decode toml 1.0 into typed nodes · toml 1.0 tables arrays and dotted keys · exact int64 values from a toml document.**

## Decide before calling

Read the [versioned contract](/v1/tools/toml10-parse/versions/1.0.0) and the supported scope below. Reuse `toml10-parse@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-parse@1.0.0` for decode toml 1.0 into typed nodes. 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

- decode toml 1.0 into typed nodes
- toml 1.0 tables arrays and dotted keys
- exact int64 values from a toml document
- closed inline tables in toml 1.0
- canonical json-safe toml document tree
- array of tables header to typed nodes
- פענוח מסמך טומל אחד אפס לצמתים

## Not supported

- convert toml into ordinary json numbers and dates
- accept toml 1.1 newlines or trailing commas inside inline tables
- preserve comments in the typed tree

## Behavior

- TOML v1.0.0 only. Inline-table newlines and trailing commas are rejected. The result is a typed tree, not ordinary JSON.
- Integers are canonical decimal strings covering the full int64 range. Floats use the documented binary64 spelling, including -0.0, inf, and nan. Datetimes stay text with style offset, local_datetime, local_date, or local_time.
- Tables keep entry order. Inline tables are marked inline true and are closed. Arrays of tables are marked array_of_tables true. Keys such as $toml, __proto__, and constructor are entry keys, never type tags.
- Duplicate keys, closed inline tables, header and dotted collisions, and out-of-range integers throw invalid_input with details.reason. Depth, node, and byte limits throw limit_exceeded before or during the walk, never after a partial success is returned.
- Output key order inside each table is source order. Unicode is not normalized. The same text always yields the same tree.

## Input

- `text` (string, required)

## Output

- `document` (object, required)

## Limits

- max input bytes: 4096
- max output bytes: 16384
- max depth: 8
- max nodes: 48

## Example

Request input:

```json
{
  "text": "bool1 = true\n"
}
```

Response:

```json
{
  "result": {
    "document": {
      "kind": "table",
      "inline": false,
      "entries": [
        {
          "key": "bool1",
          "value": {
            "kind": "bool",
            "value": true
          }
        }
      ]
    }
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "toml10-parse",
  "version": "1.0.0",
  "input": {
    "text": "bool1 = true\n"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/toml10-parse/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"text":"bool1 = true\n"}'
```

The machine-readable contract is at [/v1/tools/toml10-parse/versions/1.0.0](/v1/tools/toml10-parse/versions/1.0.0).

### CLI

```sh
node cli.mjs run toml10-parse 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Toml10 format](/tools/toml10-format): Emit canonical TOML 1.0 source from a typed document tree.
- [Toml10 validate](/tools/toml10-validate): Check a TOML 1.0 document and locate the first structural error.
- [Asn1 der parse](/tools/asn1-der-parse): Parse one ASN.1 DER value into a flat schema-free TLV node list.
- [Xpath10 paths](/tools/xpath10-paths): List the canonical XPath 1.0 path of each node in a location-path node-set, in document order.
- [Asn1 der encode tree](/tools/asn1-der-encode-tree): Encode a schema-free ASN.1 node list as one canonical DER value.
- [Asn1 der primitive decode](/tools/asn1-der-primitive-decode): Decode one universal DER primitive from lowercase hex into typed fields.
