Skip to main content
Glama

add_decision

Record technical decisions with key details and reasoning to maintain project documentation and track decision-making processes.

Instructions

Record an important technical decision

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesDecision key/name
valueYesDecision value
reasoningYesReasoning behind the decision

Implementation Reference

  • Core implementation of add_decision tool: stores decision in current session's importantDecisions and appends structured Decision to globalDecisions, then persists project memory
    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}`)); }
  • MCP CallToolRequestSchema handler case for 'add_decision': extracts args 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' }] }; }
  • src/index.ts:579-591 (registration)
    Tool registration in ListToolsResponse: defines name, description, and inputSchema for validation
    { 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'] } },
  • Input schema definition for add_decision tool parameters: key (string), value (string), reasoning (string)
    { 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'] } },

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