Paths-LE
v2.4.1Extract 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.
| Parameter | Type | Description |
|---|---|---|
content * | string | The document text to scan. |
dedupe | boolean | Collapse repeated paths to their first occurrence. |
filename | string | Filename used to infer the format when `format` is absent, e.g. "tsconfig.json". |
format | string | Document format. Common extensions and aliases are accepted. Omit it and `filename` to scan the text generically. |
maxResults | integer | Cap on returned paths (default 500). meta.truncated reports whether any were dropped. |