Skip to main content
Glama

update_session_summary

Append current session information to the summary file without closing the session, enabling ongoing documentation of work progress.

Instructions

Update the session summary file with current session info without doing a full session close.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
summaryYesSession summary text to append to session-summary.md

Implementation Reference

  • Main tool handler for 'update_session_summary' that constructs a SessionSummary object (ignoring input args) and delegates to SessionCloser.updateSessionSummary()
    case 'update_session_summary': { const summary = { timestamp: new Date().toISOString(), accomplishments: [], decisions: [], blockers: [], nextSteps: [], filesChanged: [], }; await (this.sessionCloser as any).updateSessionSummary(summary); return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Session summary updated!', }), }, ], }; }
  • Core implementation of session summary update: appends formatted session entry to .agent-os/session-summary.md file
    private async updateSessionSummary(summary: SessionSummary): Promise<void> { const summaryPath = path.join(this.projectRoot, '.agent-os', 'session-summary.md'); // Ensure directory exists await fs.mkdir(path.dirname(summaryPath), { recursive: true }); let existingContent = ''; try { existingContent = await fs.readFile(summaryPath, 'utf-8'); } catch { // File doesn't exist, create it existingContent = '# Session Summary\n\n'; } const sessionEntry = this.formatSessionEntry(summary); const updatedContent = existingContent + '\n' + sessionEntry; await fs.writeFile(summaryPath, updatedContent, 'utf-8'); }
  • src/index.ts:85-98 (registration)
    Tool registration in ListToolsRequest handler, including name, description, and JSON input schema
    { name: 'update_session_summary', description: 'Update the session summary file with current session info without doing a full session close.', inputSchema: { type: 'object', properties: { summary: { type: 'string', description: 'Session summary text to append to session-summary.md', }, }, required: ['summary'], }, },
  • TypeScript interface defining the SessionSummary structure used by the updateSessionSummary method
    export interface SessionSummary { timestamp: string; accomplishments: string[]; decisions: Decision[]; blockers: string[]; nextSteps: string[]; filesChanged: string[]; }

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/Tylarcam/mcp-session-closer'

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