Skip to main content
Glama

add_session_step

Record completion of a step in the current session by tracking modified files and providing optional details for session history.

Instructions

Record completion of a step in the current session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepYesDescription of the completed step
filesModifiedYesList of files that were modified
descriptionNoOptional detailed description

Implementation Reference

  • Core implementation of addSessionStep that loads project memory, creates a SessionStep object with step details, files modified, and optional description, appends it to current session's completedSteps, saves the memory, and logs success.
    async 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}`));
    }
  • MCP server tool handler for 'add_session_step' that extracts parameters from request arguments, calls memoryManager.addSessionStep, and returns success response.
    case '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/index.ts:567-578 (registration)
    Registration of the 'add_session_step' tool in the MCP server's 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']
      }
    },
  • Input schema definition for the add_session_step tool, specifying required 'step' and 'filesModified' fields, and optional 'description'.
    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']

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