Get File Info
statRetrieve metadata for files or directories to check existence, size, and read cost. One path returns a single result; up to 1000 paths return per-path values in input order.
Instructions
Get metadata for files or directories. Use when you need to check existence, size, or read cost. Do not use for contents; use read instead, list for directory entries, or find_files to find by name. Pass path or paths (up to 1000). Paths settle independently (missing gives NOT_FOUND); the call errors only if all fail. Symlinks report their own metadata, not the target's. path gives one result; paths gives one per path, in input order. Returns per-path values or errors ({ code, message }), plus summary { total, succeeded, failed }. Values hold name, path, type, size or entryCount (directories), tokenEstimate (files, bytes/4), lineCount (text files up to 256 KiB, in calls of up to 20 paths), timestamps, permissions (POSIX) or readOnly (Windows), isHidden (dot prefix), hardLinks (a file with other names; a write changes them all), mimeType, symlinkTarget.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "stat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Single file path; mutually exclusive with paths | |
| paths | No | Array of file paths for batch mode (max 1000); mutually exclusive with path |