add_session_step
Track step completion and file modifications in a coding session using the MCP Memory Server. Enhances project awareness by recording actions and maintaining persistent memory for AI coding assistants.
Instructions
Record completion of a step in the current session
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | Optional detailed description | |
| filesModified | Yes | List of files that were modified | |
| step | Yes | Description of the completed step |
Input Schema (JSON Schema)
{
"properties": {
"description": {
"description": "Optional detailed description",
"type": "string"
},
"filesModified": {
"description": "List of files that were modified",
"items": {
"type": "string"
},
"type": "array"
},
"step": {
"description": "Description of the completed step",
"type": "string"
}
},
"required": [
"step",
"filesModified"
],
"type": "object"
}
Implementation Reference
- src/index.ts:566-578 (registration)Tool registration in listTools handler, including name, description, and input schema definition{ name: 'add_session_step', description: 'Record completion of a step in the current session', inputSchema: { type: 'object', properties: { step: { type: 'string', description: 'Description of the completed step' }, filesModified: { type: 'array', items: { type: 'string' }, description: 'List of files that were modified' }, description: { type: 'string', description: 'Optional detailed description' } }, required: ['step', 'filesModified'] } },
- src/index.ts:795-801 (handler)MCP server dispatch handler for add_session_step tool call, extracts parameters and delegates to MemoryManagercase 'add_session_step': { const step = args.step as string; const filesModified = args.filesModified as string[]; const description = args.description as string | undefined; await this.memoryManager.addSessionStep(step, filesModified, description); return { content: [{ type: 'text', text: 'Session step added successfully' }] }; }
- src/memory-manager.ts:145-160 (handler)Core handler implementation that creates a SessionStep object, appends it to current session's completedSteps, saves the project memory, and logs completionasync addSessionStep(step: string, filesModified: string[], description?: string): Promise<void> { const memory = await this.getProjectMemory(); const sessionStep: SessionStep = { step, completed: new Date().toISOString(), filesModified, description, timeSpent: 0 // Could be calculated if needed }; memory.currentSession.completedSteps.push(sessionStep); await this.saveProjectMemory(memory); console.log(chalk.green(`โ Step completed: ${step}`)); }