Skip to main content
Glama
aaronfeingold

MCP Project Context Server

record_decision

Capture and log architectural or technical decisions within a project, including the decision details, reasoning, and expected impact, to maintain clarity and context for future reference.

Instructions

Record an architectural or technical decision

Input Schema

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

Implementation Reference

  • src/server.ts:317-361 (registration)
    Registration of the 'record_decision' tool using this.server.registerTool, including inline schema and handler function.
    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" }`, }, ], }; } } );
  • The MCP tool handler logic for 'record_decision', which invokes the context manager's recordDecision method and returns formatted 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" }`, }, ], }; } }
  • Zod input schema for the 'record_decision' tool parameters.
    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"), },
  • Core helper method that records the decision by appending to the project's decisions array and persisting via store.
    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); }
  • Zod schema definition for the decisions array in ProjectContext, matching the tool's data structure.
    decisions: z .array( z.object({ id: z.string(), decision: z.string(), reasoning: z.string(), timestamp: z.string(), impact: z.string().optional(), }) ) .default([]),

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