retrieve_flattened
Retrieve the original tool output from a flattened session by providing the session ID and tool use ID found in the [FLATTENED] marker. Returns the full text or image.
Instructions
Retrieve original tool result content from a flattened session, read straight from its backup. When you see [FLATTENED id=XXX tool=Read ... | text NNNB/NNL | session=YYY | ...] in the conversation, call this with the value after "id=" as tool_use_id and the value after "session=" as session_id. Returns the original text output, or — for flattened screenshots — the actual image so you can view it again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| claude_dir | No | Absolute path (or ~/...) to the Claude config dir whose sessions to target — the dir holding projects/, e.g. ~/.claude-2 for a second profile. Default: $CLAUDE_CONFIG_DIR if set (so a server running inside an alternate profile targets it), else ~/.claude. | |
| session_id | Yes | Value after "session=" in the [FLATTENED ... session=YYY ...] marker | |
| project_dir | No | Absolute path to project. Default: the project the CLI runs in (cwd) | |
| tool_use_id | Yes | Value after "id=" in the [FLATTENED id=XXX ...] marker |