Skip to main content
Glama
tairqaldy

CodeArchitect MCP

by tairqaldy

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 ===

  1. ALWAYS saves to main folder: ~/.codearchitect/sessions/ (user's home directory)

  2. OPTIONALLY saves to project folder if user specifies projectDir parameter

  3. 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:

  1. User exports chat: In Cursor/VS Code → three dots (⋯) → "Export Chat"

  2. User saves to: ~/.codearchitect/exports/ folder (main location - always the same)

  3. User says: "use codearchitect store_session"

  4. 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

TableJSON Schema
NameRequiredDescriptionDefault
topicNoOptional: Session topic/title. If not provided, will be auto-extracted from conversation.
formatNoFormat of conversation input. "plain" for text, "messages" for JSON array. Default: "plain"plain
projectDirNoOptional: 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.
conversationNoOPTIONAL: 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": "..."}].
exportFilenameNoOPTIONAL: 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).
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses behavior: storage locations (main folder always, project folder optionally), no auto-detection, export file vs direct conversation methods, error handling, and response format. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but well-structured with clear sections (WHEN TO USE, STORAGE BEHAVIOR, PARAMETERS, WORKFLOW, ERROR HANDLING, RESPONSE). It is front-loaded with purpose. Some redundancy exists, but overall it is organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 5 parameters, no output schema, and no annotations, the description is exhaustive: it covers purpose, usage, behavior, parameter guidance, workflow steps, error handling, and response format, leaving no gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by explaining when to use each parameter (e.g., 'only use if export file unavailable' for conversation) and providing workflow context, making semantics clearer.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Save important conversations for future reference.' It differentiates from siblings (get_session, search_session) by focusing on saving, and provides explicit usage examples like 'save this conversation'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

A dedicated 'WHEN TO USE' section lists specific user phrases and contexts (e.g., after solving complex problems). It implicitly excludes retrieval use cases handled by sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tairqaldy/codearchitect-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server