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']
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it 'records' completion without disclosing behavioral traits like whether this is a write operation, if it's idempotent, what happens if no session exists, or how it interacts with session state. This is inadequate for a mutation tool with zero annotation coverage.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero wasted words, clearly front-loading the core purpose. Every word earns its place, making it easy for an agent to parse quickly.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical context like what 'recording' entails (e.g., creates a log entry, updates session state), expected outcomes, or error conditions, leaving significant gaps for agent understanding.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all three parameters. The description adds no additional parameter semantics beyond what's in the schema (e.g., no examples or constraints), meeting the baseline for high coverage but not providing extra value.

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

Purpose4/5

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

The description clearly states the action ('Record completion') and resource ('a step in the current session'), making the purpose understandable. However, it doesn't explicitly differentiate from siblings like 'add_changelog_entry' or 'add_decision' which might also record progress-related information, preventing a perfect score.

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

Usage Guidelines2/5

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

The description provides minimal guidance by implying usage during a session ('current session'), but offers no explicit when-to-use rules, prerequisites (e.g., requires an active session), or alternatives (e.g., vs. 'add_changelog_entry'). This leaves the agent with insufficient context for optimal tool selection.

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

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