Skip to main content

make_read

Function make_read 

Source
pub fn make_read(options: MakeReadOptions) -> FunctionTool
Expand description

Creates a sandbox-routed read tool.

The call fails when path is not absolute or has a .. segment, when an image or document does not have the bytes its extension promises, when it exceeds a size cap, and when a text file is not UTF-8.

use strands::vended_tools::read::{MakeReadOptions, make_read};

let read = make_read(MakeReadOptions::builder().media(false).build());
assert!(!strands::Tool::description(&read).contains("Images"));