Skip to main content
Glama
aaronfeingold

MCP Project Context Server

End Session

end_session

End a project session by recording achievements, blockers, and plans for the next session to maintain context continuity in the MCP Project Context Server.

Instructions

End current session with summary

Input Schema

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

Implementation Reference

  • Handler function for the 'end_session' tool. Currently a stub that returns a success message, with a note to implement updateSession in ProjectStore.
    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 definition for the 'end_session' tool, including sessionId and optional arrays for achievements, blockers, and nextSession plans.
    {
      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"),
      },
  • src/server.ts:408-454 (registration)
    Registration of the 'end_session' tool using this.server.registerTool, including schema and handler inline.
    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"
                }`,
              },
            ],
          };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'End current session with summary' implies a mutation (ending something) but doesn't disclose behavioral traits like whether this is destructive, what happens to session data, if it requires specific permissions, or what the summary output looks like. It lacks details on side effects or system behavior.

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 waste. It's front-loaded with the core action ('End current session') and adds a clarifying detail ('with summary'). Every word earns its place, making it highly concise and well-structured.

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?

Given no annotations, no output schema, and a mutation tool (implied by 'End'), the description is incomplete. It doesn't explain what 'ending a session' means in this context, what the summary includes, or what the tool returns. For a tool with 4 parameters and potential side effects, more context is needed to guide the agent effectively.

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 4 parameters. The description adds no parameter semantics beyond what's in the schema—it doesn't explain how 'achievements', 'blockers', or 'nextSession' relate to the summary or session ending. Baseline 3 is appropriate as the schema handles parameter documentation.

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

Purpose3/5

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

The description 'End current session with summary' states the verb ('End') and resource ('current session'), but it's vague about what 'with summary' entails. It doesn't clearly distinguish this tool from sibling tools like 'start_session' or explain what ending a session actually does beyond the summary aspect.

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 no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., must have an active session), exclusions, or relationships to sibling tools like 'start_session' or 'add_note'. The agent must infer usage from the tool name alone.

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

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