get_resource
Get metadata and actions for a specific file or directory at the given path.
Returns a resource object or an error if not found or not allowed.
Input schema{
"properties": {
"path": {
"title": "Path",
"type": "string"
}
},
"required": [
"path"
],
"title": "get_resourceArguments",
"type": "object"
}Output schema{
"properties": {
"result": {
"additionalProperties": true,
"title": "Result",
"type": "object"
}
},
"required": [
"result"
],
"title": "get_resourceOutput",
"type": "object"
} | — | | — |
init
Initialize and verify accessibility of allowed directories.
Optionally list a directory and/or read a file if parameters are provided.
Args:
directory: Optional directory path to list contents
file_path: Optional file path to read content
Returns:
A dictionary containing:
- message: Status message ("OK" if all directories accessible, error description if not)
- isError: Boolean indicating if there was an error
- details: Additional information about directory accessibility
- directory_contents: Optional list of directory contents if directory parameter provided
- file_content: Optional file content if file_path parameter provided
Input schema{
"properties": {
"directory": {
"title": "Directory",
"type": "string"
},
"file_path": {
"title": "File Path",
"type": "string"
}
},
"required": [
"directory",
"file_path"
],
"title": "initArguments",
"type": "object"
}Output schema{
"properties": {
"result": {
"additionalProperties": true,
"title": "Result",
"type": "object"
}
},
"required": [
"result"
],
"title": "initOutput",
"type": "object"
} | — | | — |
list_directory
List files and subdirectories in the given directory with optional progress reporting.
Args:
directory: The absolute or relative path to the directory (supports both / and \ separators).
report_progress: Whether to include progress information in the response.
batch_size: Number of items to process before reporting progress (default: 100).
Returns:
If report_progress is False: A list of file and directory names in the directory.
If report_progress is True: A dictionary containing:
- contents: List of file and directory names
- progress_info: Dictionary with progress details
- total_items: Total number of items found
- processing_time: Time taken to process the directory
If an error occurs, returns a dictionary with "error" and "error_message" keys.
Input schema{
"properties": {
"directory": {
"title": "Directory",
"type": "string"
},
"report_progress": {
"default": true,
"title": "Report Progress",
"type": "boolean"
},
"batch_size": {
"default": 100,
"title": "Batch Size",
"type": "integer"
}
},
"required": [
"directory"
],
"title": "list_directoryArguments",
"type": "object"
}Output schema{
"properties": {
"result": {
"additionalProperties": true,
"title": "Result",
"type": "object"
}
},
"required": [
"result"
],
"title": "list_directoryOutput",
"type": "object"
} | — | | — |
list_resources
List all resources (files and directories) in the specified directory (or all allowed_dirs if not specified) in MCP resource format.
Supports progress reporting for large workspaces.
Args:
directory: Directory to start from (optional, defaults to all allowed_dirs)
report_progress: If True, returns progress info and batches
batch_size: Number of resources per progress batch
Returns:
If report_progress is False: List of all resource objects
If report_progress is True: Dict with contents, progress_info, total_items, processing_time
Input schema{
"properties": {
"directory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Directory"
},
"report_progress": {
"default": true,
"title": "Report Progress",
"type": "boolean"
},
"batch_size": {
"default": 100,
"title": "Batch Size",
"type": "integer"
}
},
"title": "list_resourcesArguments",
"type": "object"
} | — | | — |
read_file
Read the content of a file.
Args:
file_path: The absolute or relative path to the file (supports both / and \ separators).
Returns:
The text content of the file.
Raises:
ValueError: If the file is not allowed, does not exist, or has a disallowed extension.
Input schema{
"properties": {
"file_path": {
"title": "File Path",
"type": "string"
}
},
"required": [
"file_path"
],
"title": "read_fileArguments",
"type": "object"
}Output schema{
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "read_fileOutput",
"type": "object"
} | — | | — |
read_file_binary
Read the content of a file as base64-encoded bytes.
Returns a dict with 'content_base64' (base64 string) or an error.
Input schema{
"properties": {
"file_path": {
"title": "File Path",
"type": "string"
}
},
"required": [
"file_path"
],
"title": "read_file_binaryArguments",
"type": "object"
}Output schema{
"properties": {
"result": {
"additionalProperties": true,
"title": "Result",
"type": "object"
}
},
"required": [
"result"
],
"title": "read_file_binaryOutput",
"type": "object"
} | — | | — |
write_file
Write text content to a file.
Args:
file_path: The absolute or relative path to the file (supports both / and \ separators).
content: The text content to write.
Raises:
ValueError: If the file is not allowed, parent directory issues, disallowed extension, or write fails.
Input schema{
"properties": {
"file_path": {
"title": "File Path",
"type": "string"
},
"content": {
"title": "Content",
"type": "string"
}
},
"required": [
"file_path",
"content"
],
"title": "write_fileArguments",
"type": "object"
}Output schema{
"properties": {
"result": {
"title": "Result",
"type": "null"
}
},
"required": [
"result"
],
"title": "write_fileOutput",
"type": "object"
} | — | | — |
write_file_binary
Write binary content to a file from base64-encoded string.
Returns a dict with success status or error.
Args:
file_path: The absolute or relative path to the file (supports both / and \ separators).
content_base64: Base64-encoded binary content.
Returns:
{"success": true, "bytes_written": int, "encoding": "base64", "error": false} on success
{"error": true, "error_message": str} on failure
Input schema{
"properties": {
"file_path": {
"title": "File Path",
"type": "string"
},
"content_base64": {
"title": "Content Base64",
"type": "string"
}
},
"required": [
"file_path",
"content_base64"
],
"title": "write_file_binaryArguments",
"type": "object"
}Output schema{
"properties": {
"result": {
"additionalProperties": true,
"title": "Result",
"type": "object"
}
},
"required": [
"result"
],
"title": "write_file_binaryOutput",
"type": "object"
} | — | | — |