Parameters
Optional. Specific session folder name (e.g.,
authentication-implementation) or filename to retrieve. If not provided, lists all sessions.Optional. Filter sessions by date (YYYY-MM-DD format). Only used when listing sessions.
Output format:
"json" for JSON, "toon" for TOON format (~40% token reduction), "auto" to automatically choose best format. Default: "auto".Optional. Limit number of sessions returned when listing. Default: no limit.
Response
Get Specific Session
Always
true on success.Session object with content.
Session folder name (e.g.,
authentication-implementation).Session topic.
ISO date string.
Full path to session file (prefers
full.md when available).Session content (markdown format).
Parsed messages array (if format is ‘messages’).
Format used:
"json" or "toon".List Sessions
Always
true on success.Array of session metadata.
Session folder name (e.g.,
authentication-implementation).Session topic.
ISO date string.
Full path to session file (prefers
full.md when available).File size in bytes.
Total number of sessions returned.
Format used:
"json" or "toon".Error
Always
false.Error code (see below).
Human-readable error message.
Error Codes
| Code | Description |
|---|---|
FILE_NOT_FOUND | Session file not found |
INVALID_DATE | Invalid date format |
READ_ERROR | Cannot read session file |
PARSE_ERROR | Cannot parse session file |
UNKNOWN_ERROR | Unexpected error |
Examples
Get Specific Session
List All Sessions
List Sessions by Date
TOON Format
Theget_session tool supports TOON (Token-Oriented Object Notation) format, which provides ~40% token reduction compared to JSON for uniform data structures like message arrays and session lists.
When TOON is Used
- Automatic (
auto): TOON is used when data is uniform (e.g., arrays of messages with same structure) - Manual (
toon): Force TOON format (may fallback to JSON if data isn’t uniform) - JSON (
json): Always use JSON format
Benefits
- ~40% token reduction for uniform data structures
- Lower API costs when sending to LLMs
- Faster processing with fewer tokens
- Automatic fallback to JSON for non-uniform data
Session Retrieval
Folder-based sessions (v0.1.5+):- Sessions are stored in topic-named folders with
summary.mdandfull.md - When retrieving by folder name (without suffix), system automatically prefers
full.mdfor complete context - You can also specify
-summary.mdor-full.mdexplicitly if needed
- System automatically handles both old flat-file format and new folder-based format
- Old sessions are still accessible and will be listed correctly
Storage Location
Always retrieves from:~/.codearchitect/sessions/
- Windows:
C:\Users\YourName\.codearchitect\sessions\ - Linux/Mac:
~/.codearchitect/sessions/ - No project detection - all sessions are in main folder