Paths-LE

v2.4.1
io.github.nolindnaidoo/paths-le Checked 2 hours ago Published 1 month ago

Extract file and directory paths from config files and code, with their kind and position.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

extract_paths

Extract every file and directory path from a document, with its kind and 1-based line and column. Reads JSON, YAML, TOML, CSV, dotenv, JavaScript, TypeScript, HTML and CSS with a parser for that format, and anything else — Python, Go, Markdown, a Dockerfile — by scanning its text, which finds paths that carry a separator or a quoted filename. Each path is classified as file, relative, absolute or url. Paths are reported as written — nothing is resolved against a workspace or the filesystem.

ParameterTypeDescription
content *stringThe document text to scan.
dedupebooleanCollapse repeated paths to their first occurrence.
filenamestringFilename used to infer the format when `format` is absent, e.g. "tsconfig.json".
formatstringDocument format. Common extensions and aliases are accepted. Omit it and `filename` to scan the text generically.
maxResultsintegerCap on returned paths (default 500). meta.truncated reports whether any were dropped.