Skip to main content
Glama
aaronfeingold

MCP Project Context Server

end_session

Terminate the current coding session by summarizing achievements, blockers, and plans for the next session. Ensures session details are documented for continuity in the MCP Project Context Server.

Instructions

End current session with summary

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
achievementsNoSession achievements
blockersNoBlockers encountered
nextSessionNoPlans for next session
sessionIdYesSession ID

Implementation Reference

  • Handler function that implements the logic for ending a session. Currently a stub that returns a success message without updating the store.
    async ({ sessionId, achievements, blockers, nextSession }) => { try { // Note: You'll need to implement updateSession in ProjectStore // For now, just return success return { content: [ { type: "text", text: `Session ${sessionId} ended successfully`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error ending session: ${ error instanceof Error ? error.message : "Unknown error" }`, }, ], }; } }
  • Input schema using Zod for validating parameters of the end_session tool: sessionId (required), achievements, blockers, nextSession (all arrays of strings with defaults).
    inputSchema: { sessionId: z.string().describe("Session ID"), achievements: z .array(z.string()) .default([]) .describe("Session achievements"), blockers: z .array(z.string()) .default([]) .describe("Blockers encountered"), nextSession: z .array(z.string()) .default([]) .describe("Plans for next session"), },
  • src/server.ts:408-454 (registration)
    Full registration of the end_session tool in the MCP server using registerTool, including name, metadata, input schema, and inline handler function.
    this.server.registerTool( "end_session", { title: "End Session", description: "End current session with summary", inputSchema: { sessionId: z.string().describe("Session ID"), achievements: z .array(z.string()) .default([]) .describe("Session achievements"), blockers: z .array(z.string()) .default([]) .describe("Blockers encountered"), nextSession: z .array(z.string()) .default([]) .describe("Plans for next session"), }, }, async ({ sessionId, achievements, blockers, nextSession }) => { try { // Note: You'll need to implement updateSession in ProjectStore // For now, just return success return { content: [ { type: "text", text: `Session ${sessionId} ended successfully`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error ending session: ${ error instanceof Error ? error.message : "Unknown error" }`, }, ], }; } } );

Other Tools

Related 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/aaronfeingold/mcp-project-context'

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