bounded-filesystem-mcp
v0.1.0MCP filesystem server with bounded tool results and paged reads, forked from @modelcontextprotocol/server-filesystem
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
read_file Read File (Deprecated)
Read the complete contents of a file as text. DEPRECATED: Use read_text_file instead. Use the 'offset' and 'limit' parameters to read a window of characters. Results longer than 50,000 characters are cut short, ending with a notice that says how to get the rest.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
head | number | If provided, returns only the first N lines of the file |
limit | integer | Maximum number of characters to return, clamped to the result cap |
offset | integer | Character position to start reading from (default 0). Use the offset given in a truncation notice to continue |
tail | number | If provided, returns only the last N lines of the file |
read_text_file Read Text File
Read the complete contents of a file from the file system as text. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Use the 'head' parameter to read only the first N lines of a file, or the 'tail' parameter to read only the last N lines of a file. Use the 'offset' and 'limit' parameters to read a window of characters, for example to continue after a truncated result; they cannot be combined with 'head' or 'tail'. Results longer than 50,000 characters are cut short, ending with a…
| Parameter | Type | Description |
|---|---|---|
path * | string | |
head | number | If provided, returns only the first N lines of the file |
limit | integer | Maximum number of characters to return, clamped to the result cap |
offset | integer | Character position to start reading from (default 0). Use the offset given in a truncation notice to continue |
tail | number | If provided, returns only the last N lines of the file |
read_media_file Read Media File
Read an image or audio file. Returns the base64 encoded data and MIME type. Files larger than 5,242,880 bytes are refused with an error. Only works within allowed directories.
| Parameter | Type | Description |
|---|---|---|
path * | string |
read_multiple_files Read Multiple Files
Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Results longer than 50,000 characters are cut short, ending with a notice that says how to get the rest. Only works within allowed directories.
| Parameter | Type | Description |
|---|---|---|
paths * | array | Array of file paths to read. Each path must be a string pointing to a valid file within allowed directories. |
write_file Write File
Create a new file or completely overwrite an existing file with new content. Use with caution as it will overwrite existing files without warning. Handles text content with proper encoding. Only works within allowed directories.
| Parameter | Type | Description |
|---|---|---|
content * | string | |
path * | string |
edit_file Edit File
Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within allowed directories.
| Parameter | Type | Description |
|---|---|---|
edits * | array | |
path * | string | |
dryRun | boolean | Preview changes using git-style diff format |
create_directory Create Directory
Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Perfect for setting up directory structures for projects or ensuring required paths exist. Only works within allowed directories.
| Parameter | Type | Description |
|---|---|---|
path * | string |
list_directory List Directory
Get a detailed listing of all files and directories in a specified path. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is essential for understanding directory structure and finding specific files within a directory. Only works within allowed directories.
| Parameter | Type | Description |
|---|---|---|
path * | string |
list_directory_with_sizes List Directory with Sizes
Get a detailed listing of all files and directories in a specified path, including sizes. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is useful for understanding directory structure and finding specific files within a directory. Only works within allowed directories.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
sortBy | string | Sort entries by name or size |
directory_tree Directory Tree
Get a recursive tree view of files and directories as a JSON structure. Each entry includes 'name', 'type' (file/directory), and 'children' for directories. Files have no children array, while directories always have a children array (which may be empty). The output is formatted with 2-space indentation for readability. Only works within allowed directories.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
excludePatterns | array |
move_file Move File
Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail. Works across different directories and can be used for simple renaming within the same directory. Both source and destination must be within allowed directories.
| Parameter | Type | Description |
|---|---|---|
destination * | string | |
source * | string |
search_files Search Files
Recursively search for files and directories matching a pattern. The patterns should be glob-style patterns that match paths relative to the working directory. Use pattern like '*.ext' to match files in current directory, and '**/*.ext' to match files in all subdirectories. Returns full paths to all matching items. Great for finding files when you don't know their exact location. Only searches within allowed directories.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
pattern * | string | |
excludePatterns | array |
get_file_info Get File Info
Retrieve detailed metadata about a file or directory. Returns comprehensive information including size, creation time, last modified time, permissions, and type. This tool is perfect for understanding file characteristics without reading the actual content. Only works within allowed directories.
| Parameter | Type | Description |
|---|---|---|
path * | string |
list_allowed_directories List Allowed Directories
Returns the list of directories that this server is allowed to access. Subdirectories within these allowed directories are also accessible. Use this to understand which directories and their nested paths are available before trying to access files.