Path set intersection
path-set-intersection · version 1.0.0 · File paths (lexical) · free, no key needed
Compute the set intersection of multiple path collections using lexical path equivalence.
Use when you need to: path set intersection · common paths in sets.
Supported
- path set intersection
- common paths in sets
Not supported
- stat file
- filesystem access
Behavior
- Returns paths present in ALL input sets, using normalized lexical equivalence. Preserves order from the first set.
Input
sets(array of array of string, required): min items 2; max items 10format(one of "posix", "windows", "auto", optional)case_sensitive(boolean, optional)normalize(boolean, optional)
Output
intersection(array of string, optional)count(integer, optional)format(string, optional)
Limits
- max sets: 10
- max paths per set: 10000
- max path bytes: 4096
Example
Request input:
{
"sets": [
[
"a.ts",
"b.ts",
"c.ts"
],
[
"b.ts",
"c.ts",
"d.ts"
],
[
"c.ts",
"e.ts"
]
]
}
Response:
{
"result": {
"intersection": [
"c.ts"
],
"count": 1,
"format": "posix"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "path-set-intersection",
"version": "1.0.0",
"input": {
"sets": [
[
"a.ts",
"b.ts",
"c.ts"
],
[
"b.ts",
"c.ts",
"d.ts"
],
[
"c.ts",
"e.ts"
]
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/path-set-intersection/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"sets":[["a.ts","b.ts","c.ts"],["b.ts","c.ts","d.ts"],["c.ts","e.ts"]]}'
The machine-readable contract is at /v1/tools/path-set-intersection/versions/1.0.0.
CLI
node cli.mjs run path-set-intersection 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Path set difference: Compute the set difference (A \ B) of two path collections using lexical path equivalence.
- Path set union: Compute the set union of multiple path collections, normalized and deterministically sorted.
- Path set classify: Classify an array of file paths by file extension, depth histogram, and path format.
- Path set dedupe: Deduplicate an array of paths based on lexical equivalence while preserving first or last seen order.
- Path set glob filter: Filter an array of paths against glob patterns with inclusion and exclusion rules lexically without filesystem access.
- Path set hierarchy tree: Transform a flat array of file paths into a nested deterministic directory tree structure.