Read the open editor
get_sessionRead the live session: which project is open in the parcad window and the script as it currently stands in the editor, including anything the user has typed since you last looked. Call this before editing — the on-screen script may differ from the file on disk, and editing from a stale copy silently reverts the user's work. name is null until something is opened; revision increases with every change. The editor pushes its document a moment after typing stops, so the very last keystrokes can lag by about half a second.
viewers is what each open window is actually drawing, as the window reported it: the revision it last evaluated, whether that built, the error if not, and the volume_mm3 it measured. A window below the session's revision has not caught up; one with built: false is still drawing an older part beside that error. An empty list means no window is open, so nobody is looking. A viewer over 30 seconds old is marked stale and is not evidence the user is looking at anything; one silent for 300 seconds is left out.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| origin | Yes | ||
| script | Yes | ||
| viewers | Yes | ||
| revision | Yes |