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§
- Read
File Opts - Optional knobs for
read_file. Default-constructible.
Functions§
- read_
file - Read a file with path-traversal protection.