Path lexical parse

path-lexical-parse · version 1.0.0 · File paths (lexical) · free, no key needed

Decompose a file path into its lexical components without accessing the filesystem.

Use when you need to: path lexical parse · parse file path · path decomposition.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "path": "/usr/local/bin/node"
}

Response:

{
  "result": {
    "format": "posix",
    "root": "/",
    "dir": "/usr/local/bin",
    "base": "node",
    "stem": "node",
    "ext": "",
    "drive": null,
    "is_unc": false,
    "is_absolute": true,
    "segments": [
      "usr",
      "local",
      "bin",
      "node"
    ]
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "path-lexical-parse",
  "version": "1.0.0",
  "input": {
    "path": "/usr/local/bin/node"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/path-lexical-parse/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"path":"/usr/local/bin/node"}'

The machine-readable contract is at /v1/tools/path-lexical-parse/versions/1.0.0.

CLI

node cli.mjs run path-lexical-parse 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.