# touchstone.locomot.io Syntax Validator

> touchstone.locomot.io Syntax Validator is a paid API for AI agents from touchstone.locomot.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Validates JSON, YAML, TOML, Python, or regex syntax using the canonical parser, returning a valid/invalid result plus error location on failure

## Facts

- Endpoint: GET https://touchstone.locomot.io/syntax
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/touchstone-locomot-io-syntax-validator-cb90bcbc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PE73DDsoan5zb_QQuOWdN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability touchstone-locomot-io-syntax-validator-cb90bcbc
```

Example prompt: Can you check if this YAML is syntactically valid? `name: myapp\nversion: 1.0\nports: [8080, 9090` — I think there might be a bracket issue somewhere.

## When to prefer this

Use this endpoint when you need deterministic, canonical-parser-based syntax checking for JSON, YAML, TOML, Python source, or regex patterns — especially when you need the exact error location (line/column) rather than a heuristic lint. Prefer over LLM-based syntax guessing when you need a ground-truth pass/fail answer. Use POST for longer source content.

## Known failure modes

- Missing 'content' query parameter returns an error
- Missing 'lang' query parameter returns an error
- Unsupported language value returns an error
- Content too long for GET — use POST /syntax instead
- Payment not provided or x402 handshake fails — HTTP 402 returned
- Malformed request returns HTTP 400
- Regex 'test' param only applies when lang=regex; ignored otherwise

## How this service works

Deterministic syntax validation — does this JSON/YAML/TOML/Python/regex parse? Valid/invalid + error location from the canonical parser. For long source use POST. Free sample, no payment required: GET /play/syntax

## Output

Returns a JSON object with a boolean 'valid' field, the detected language ('lang'), the source echoed back, and either null for 'error' (if valid) or an error description with location (line/column) indicating where parsing failed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "content",
      "lang"
     ],
     "properties": {
      "lang": {
       "type": "string",
       "description": "json | yaml | toml | python | regex"
      },
      "test": {
       "type": "string",
       "description": "regex only: string to match"
      },
      "content": {
       "type": "string",
       "description": "code/config to validate"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "op": {
     "type": "string"
    },
    "lang": {
     "type": "string"
    },
    "error": {
     "type": "null"
    },
    "valid": {
     "type": "boolean"
    },
    "source": {
     "type": "string"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/touchstone-locomot-io-syntax-validator-cb90bcbc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from touchstone.locomot.io](https://www.zero.xyz/host/touchstone.locomot.io/llms.txt)
