fileport
v0.1.0Sandboxed file access: read, write, edit and search in allowed dirs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
read_file
Read the full contents of a file as text.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of the file to read, inside one of the allowed directories. |
read_text_file
Read a text file, optionally limited to its first or last lines.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of the text file to read, inside one of the allowed directories. |
head | number | Return only the first N lines of the file; mutually exclusive with tail. |
tail | number | Return only the last N lines of the file; mutually exclusive with head. |
read_media_file
Read a media file and return it as base64 content.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of the media file to read, inside one of the allowed directories. |
read_multiple_files
Read several files at once, reporting per-file failures in-band.
| Parameter | Type | Description |
|---|---|---|
paths * | array | Paths of the files to read, each inside one of the allowed directories. |
write_file
Write text content to a file, creating parent folders as needed.
| Parameter | Type | Description |
|---|---|---|
content * | string | Text content to write to the file. |
path * | string | Path of the file to write, inside one of the allowed directories. |
edit_file
Apply exact-match text replacements to a file, with an optional dry run.
| Parameter | Type | Description |
|---|---|---|
edits * | array | Exact-match text replacements to apply to the file, in order. |
path * | string | Path of the file to edit, inside one of the allowed directories. |
dryRun | boolean | When true, report the changes that would be made without writing the file. |
create_directory
Create a directory, including any missing parents.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of the directory to create, inside one of the allowed directories. |
list_directory
List the entries of a directory.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of the directory to list, inside one of the allowed directories. |
list_directory_with_sizes
List directory entries together with their sizes.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of the directory to list, inside one of the allowed directories. |
sortBy | string | Sort the entries by name or by size. |
directory_tree
Return a directory as a nested JSON tree.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of the directory to return as a tree, inside one of the allowed directories. |
excludePatterns | array | Glob patterns for paths to exclude from the tree. |
move_file
Move or rename a file or directory.
| Parameter | Type | Description |
|---|---|---|
destination * | string | New path for the file or directory, inside one of the allowed directories. |
source * | string | Current path of the file or directory to move, inside one of the allowed directories. |
search_files
Recursively search for files whose names match a glob pattern.
| Parameter | Type | Description |
|---|---|---|
path * | string | Directory to search recursively, inside one of the allowed directories. |
pattern * | string | Glob pattern matched against file names. |
excludePatterns | array | Glob patterns for paths to exclude from the search. |
get_file_info
Return metadata about a file or directory.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of the file or directory to inspect, inside one of the allowed directories. |
list_allowed_directories
List the directories this server is allowed to access.