store_session
Save AI conversation sessions to maintain context continuity. Detects export files or accepts direct input for storage.
Instructions
[CodeArchitect] Save important conversations for future reference.
=== WHEN TO USE ===
User says: "use codearchitect store_session", "save this conversation", "store this", "remember this"
User wants to keep/remember an important discussion
After solving complex problems or making architecture decisions
=== STORAGE BEHAVIOR ===
ALWAYS saves to main folder: ~/.codearchitect/sessions/ (user's home directory)
OPTIONALLY saves to project folder if user specifies projectDir parameter
NEVER auto-detects project - only use projectDir if user explicitly provides it
=== CONVERSATION SOURCE (CHOOSE ONE) ===
OPTION 1: Export File (RECOMMENDED - Most Reliable)
User exports conversation from Cursor/VS Code to .codearchitect/exports/ folder
Tool automatically detects and processes the export file
No need to manually extract conversation
WORKFLOW:
User exports chat: In Cursor/VS Code → three dots (⋯) → "Export Chat"
User saves to: ~/.codearchitect/exports/ folder (main location - always the same)
User says: "use codearchitect store_session"
Tool automatically finds newest export file and stores it
If multiple exports exist:
Tool processes newest file (modified in last 10 minutes)
If user wants specific file: use exportFilename parameter (e.g., "resolve_mcp")
OPTION 2: Direct Conversation Parameter (Fallback)
Only use if export file method doesn't work
Extract FULL conversation from your context window
Format as plain text with USER/ASSISTANT markers OR JSON array
=== PARAMETERS ===
conversation (optional): Direct conversation text/JSON - only use if export file unavailable
exportFilename (optional): Pattern to match specific export file (e.g., "resolve_mcp" matches "cursor_resolve_mcp_configuration_issues.md")
topic (optional): Session topic - auto-extracted if not provided
projectDir (optional): Project directory path - if provided, saves to both main and project folders
format (optional): "plain" or "messages" - default "plain"
=== WORKFLOW (EXPORT METHOD) === Step 1: User exports conversation to ~/.codearchitect/exports/ folder (main location) Step 2: User says "use codearchitect store_session" Step 3: Tool detects export file automatically from main exports folder Step 4: Tool parses and stores conversation Step 5: Tool saves to main sessions folder (always) + optionally project folder if projectDir specified
=== ERROR HANDLING === If no export file found:
Return clear instructions with OS/IDE-specific export folder path
Tell user exactly where to save the export file
Provide step-by-step instructions
=== RESPONSE === After saving, return concise message:
"Detected export file '[filename]', saved to main: [topic-name]. Next: use codearchitect get_session [topic-name]"
Or if projectDir provided: "Detected export file '[filename]', saved to main: [topic-name] and project: [topic-name]. Next: use codearchitect get_session [topic-name]"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | Optional: Session topic/title. If not provided, will be auto-extracted from conversation. | |
| format | No | Format of conversation input. "plain" for text, "messages" for JSON array. Default: "plain" | plain |
| projectDir | No | Optional: Project directory path. If specified, saves to BOTH main folder (~/.codearchitect/sessions/) AND project/.codearchitect/sessions/. Always saves to main folder first, then also to project folder. | |
| conversation | No | OPTIONAL: Direct conversation text/JSON. Only use if export file method unavailable. If not provided, tool will automatically look for export file in .codearchitect/exports/ folder. Format as plain text with USER/ASSISTANT markers OR as JSON array [{"role": "user/assistant", "content": "..."}]. | |
| exportFilename | No | OPTIONAL: Pattern to match specific export file (case-insensitive). Example: "resolve_mcp" matches "cursor_resolve_mcp_configuration_issues.md". If not provided, tool uses newest export file (modified in last 10 minutes). |