realpath
Resolve file paths to absolute canonical form by following symlinks and resolving relative components. Normalize paths for comparison or before file operations.
Instructions
Resolve file paths to their absolute canonical form, following all symlinks and resolving all relative components. Read-only, no side effects. Fails with a clear error if the target does not exist (use --no-symlinks to relax existence check). Returns JSON with the resolved absolute path. Use to normalize paths for comparison or before file operations. Not for reading symlink targets without full resolution — use 'readlink'. See also 'readlink'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Paths to resolve. | |
| strict | No | Fail if any path does not exist. |