Skip to content

Storage

Tools for inspecting block devices, directories, files, and file contents.

Choosing where to run

All tools on this page require a host parameter (string). Pass localhost to run the command on the system the MCP server runs on, or a remote machine to run it there via SSH. See SSH Configuration for details, and Host mode for restricting which of the two a server accepts.

list_block_devices

List block devices on the system

Returns:

  • blockdevices (array of object)
    • name (string)
    • size (string)
    • type (string)
    • mountpoint (string or null)
    • fstype (string or null)
    • model (string or null)
    • children (array of object)
  • total (integer)

list_directories

List directories under a specified path with various sorting options.

Parameters:

  • path (string, required): Absolute path to the directory to analyze
  • order_by ("size", "name", "modified", default: "name"): Sort order - 'size', 'name', or 'modified' (default: 'name')
  • sort ("ascending", "descending", default: "ascending"): Sort direction - 'ascending' or 'descending' (default: 'ascending')
  • top_n (integer, default: none): Optional limit on number of directories to return (1-1000)

Returns:

  • nodes (array of object)
    • size (integer or null): Size in bytes, included only when ordering by size
    • modified (string): Modification time
    • name (string)
  • total (integer)

list_files

List files under a specified path with various sorting options.

Parameters:

  • path (string, required): Absolute path to the directory to analyze
  • order_by ("size", "name", "modified", default: "name"): Sort order - 'size', 'name', or 'modified' (default: 'name')
  • sort ("ascending", "descending", default: "ascending"): Sort direction - 'ascending' or 'descending' (default: 'ascending')
  • top_n (integer, default: none): Optional limit on number of files to return (1-1000, only used with size ordering)

Returns:

  • nodes (array of object)
    • size (integer or null): Size in bytes, included only when ordering by size
    • modified (string): Modification time
    • name (string)
  • total (integer)

read_file

Read the contents of a text file up to a safe size limit.

Parameters:

  • path (string, required): Absolute path to the file to read