Path lexical relative

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

Compute the lexical relative path from one path to another without filesystem access.

Use when you need to: path relative · relative path · compute relative path from to.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "from": "/a/b",
  "to": "/a/c/d"
}

Response:

{
  "result": {
    "relative": "../c/d",
    "format": "posix",
    "same": false
  }
}

How to call it

MCP

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

{
  "id": "path-lexical-relative",
  "version": "1.0.0",
  "input": {
    "from": "/a/b",
    "to": "/a/c/d"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/path-lexical-relative/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"from":"/a/b","to":"/a/c/d"}'

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

CLI

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

Get the client at /clients/cli/.