start_session
Begin a new AI coding session by defining a specific task, enabling persistent memory, project tracking, and safety controls within the MCP Memory Server environment.
Instructions
Start a new AI coding session with a specific task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | Description of the task to work on |
Implementation Reference
- src/index.ts:556-564 (schema)Tool schema definition for 'start_session', registered in ListToolsRequestSchema handler.name: 'start_session', description: 'Start a new AI coding session with a specific task', inputSchema: { type: 'object', properties: { task: { type: 'string', description: 'Description of the task to work on' } }, required: ['task'] }
- src/index.ts:789-793 (handler)MCP tool handler in CallToolRequestSchema switch statement that delegates to MemoryManager.startNewSession.case 'start_session': { const task = args.task as string; const sessionId = await this.memoryManager.startNewSession(task); return { content: [{ type: 'text', text: `Started session: ${sessionId}` }] }; }
- src/memory-manager.ts:125-143 (handler)Core implementation of session start logic in MemoryManager class.async startNewSession(task: string): Promise<string> { const memory = await this.getProjectMemory(); const sessionId = this.generateSessionId(); memory.currentSession = { sessionId, task, started: new Date().toISOString(), completedSteps: [], nextSteps: [], importantDecisions: {}, blockers: [] }; await this.saveProjectMemory(memory); console.log(chalk.blue(`π Started new session: ${sessionId}`)); console.log(chalk.blue(`π Task: ${task}`)); return sessionId; }