Path lexical contains

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

Check whether a child path is lexically inside a parent directory.

Use when you need to: path contains · directory containment · path traversal check.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "parent": "/app",
  "child": "/app/src/index.js"
}

Response:

{
  "result": {
    "contains": true,
    "relative": "src/index.js",
    "format": "posix"
  }
}

How to call it

MCP

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

{
  "id": "path-lexical-contains",
  "version": "1.0.0",
  "input": {
    "parent": "/app",
    "child": "/app/src/index.js"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/path-lexical-contains/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"parent":"/app","child":"/app/src/index.js"}'

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

CLI

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

Get the client at /clients/cli/.