Session Read File
session_read_fileRead a session workspace file as text or inline image to inspect executed code outputs or discover session artifacts.
Instructions
Read a file from a session workspace.
Text files return content. With as_image=True (or for image files), the file is returned as an inline image the model can see. Use session_files to discover paths; session_artifacts lists what executed code produced.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Relative path inside the workspace to read | |
| as_image | No | Return the file as an inline image the model can see, instead of text | |
| max_bytes | No | Max bytes to read from the file; default 65536 (64 KiB) | |
| session_id | Yes | Id of the session whose workspace file to read |