Skip to main content
Glama

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
NameRequiredDescriptionDefault
taskYesDescription of the task to work on

Implementation Reference

  • 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'] }
  • 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}` }] }; }
  • 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; }

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/keleshteri/mcp-memory'

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