Skip to main content
Glama
aaronfeingold

MCP Project Context Server

record_decision

Record architectural or technical decisions with reasoning and impact for project documentation and context preservation.

Instructions

Record an architectural or technical decision

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID
decisionYesDecision made
reasoningYesReasoning behind the decision
impactNoExpected impact of the decision

Implementation Reference

  • MCP tool handler for 'record_decision' that calls ContextManager.recordDecision and formats the MCP response.
    async ({ projectId, decision, reasoning, impact }) => { try { await this.contextManager.recordDecision( projectId, decision, reasoning, impact ); return { content: [ { type: "text", text: "Decision recorded successfully", }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error recording decision: ${ error instanceof Error ? error.message : "Unknown error" }`, }, ], }; }
  • Input schema using Zod for validating tool parameters: projectId, decision, reasoning, impact.
    inputSchema: { projectId: z.string().describe("Project ID"), decision: z.string().describe("Decision made"), reasoning: z.string().describe("Reasoning behind the decision"), impact: z .string() .optional() .describe("Expected impact of the decision"), },
  • src/server.ts:317-361 (registration)
    Registration of the 'record_decision' tool with the MCP server, including title, description, schema, and handler.
    this.server.registerTool( "record_decision", { title: "Record Decision", description: "Record an architectural or technical decision", inputSchema: { projectId: z.string().describe("Project ID"), decision: z.string().describe("Decision made"), reasoning: z.string().describe("Reasoning behind the decision"), impact: z .string() .optional() .describe("Expected impact of the decision"), }, }, async ({ projectId, decision, reasoning, impact }) => { try { await this.contextManager.recordDecision( projectId, decision, reasoning, impact ); return { content: [ { type: "text", text: "Decision recorded successfully", }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error recording decision: ${ error instanceof Error ? error.message : "Unknown error" }`, }, ], }; } } );
  • Helper method in ContextManager that appends the decision to the project's decisions array and persists the project update.
    async recordDecision( projectId: string, decision: string, reasoning: string, impact?: string ): Promise<void> { const project = await this.store.getProject(projectId); if (!project) { throw new Error("Project not found"); } project.decisions.push({ id: uuidv4(), decision, reasoning, impact, timestamp: new Date().toISOString(), }); await this.store.updateProject(project); }

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