Skip to main content
Glama

add_decision

Capture and document technical decisions by specifying a key, value, and reasoning for future reference, ensuring project awareness and clarity in code development.

Instructions

Record an important technical decision

Input Schema

NameRequiredDescriptionDefault
keyYesDecision key/name
reasoningYesReasoning behind the decision
valueYesDecision value

Input Schema (JSON Schema)

{ "properties": { "key": { "description": "Decision key/name", "type": "string" }, "reasoning": { "description": "Reasoning behind the decision", "type": "string" }, "value": { "description": "Decision value", "type": "string" } }, "required": [ "key", "value", "reasoning" ], "type": "object" }

Implementation Reference

  • src/index.ts:579-591 (registration)
    Tool registration in ListToolsRequestSchema handler, including the input schema definition for add_decision
    { name: 'add_decision', description: 'Record an important technical decision', inputSchema: { type: 'object', properties: { key: { type: 'string', description: 'Decision key/name' }, value: { type: 'string', description: 'Decision value' }, reasoning: { type: 'string', description: 'Reasoning behind the decision' } }, required: ['key', 'value', 'reasoning'] } },
  • MCP tool handler in CallToolRequestSchema switch statement that extracts parameters and delegates to MemoryManager.addImportantDecision
    case 'add_decision': { const key = args.key as string; const value = args.value as any; const reasoning = args.reasoning as string; await this.memoryManager.addImportantDecision(key, value, reasoning); return { content: [{ type: 'text', text: 'Decision recorded successfully' }] }; }
  • Core implementation in MemoryManager that stores the decision in current session and global decisions, then persists to project memory file
    async addImportantDecision(key: string, value: any, reasoning: string): Promise<void> { const memory = await this.getProjectMemory(); memory.currentSession.importantDecisions[key] = value; const decision: Decision = { id: this.generateId(), decision: `${key}: ${JSON.stringify(value)}`, reasoning, impact: [], timestamp: new Date().toISOString(), approvedBy: 'system', relatedFiles: [] }; memory.globalDecisions.push(decision); await this.saveProjectMemory(memory); console.log(chalk.yellow(`๐Ÿ’ก Decision recorded: ${key} = ${value}`)); }

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/keleshteri/mcp-memory'

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