Skip to main content

Module files

Module files 

Source
Expand description

Safe file reading with allowed-dir sandbox + optional grep / section / row / line-range slicing.

Pure Rust — Python bindings are in the sibling mcp-methods-py crate and wrap read_file with the legacy transform=… / section=… keyword arguments. The wrapper translates a Python callable into the &dyn Fn(&str) -> String slot on ReadFileOpts::transform.

Structs§

ReadFileOpts
Optional knobs for read_file. Default-constructible.

Functions§

read_file
Read a file with path-traversal protection.