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']
      }
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Record' implies a write operation, but it doesn't specify whether this creates a new decision, updates an existing one, requires authentication, has side effects (e.g., notifications), or what the response looks like. It lacks details on persistence, error handling, or any behavioral traits beyond the basic action.

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 appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration, making it easy for an agent to parse quickly.

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 the complexity of a write operation with no annotations and no output schema, the description is incomplete. It doesn't explain what 'recording' entails (e.g., storage location, format), potential outcomes, or error conditions. For a tool that likely modifies state, more context is needed to guide safe and effective use.

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 input schema fully documents the parameters (key, value, reasoning). The description adds no additional meaning beyond what the schema provides, such as examples or constraints on parameter values. Baseline 3 is appropriate since the schema does the heavy lifting.

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 'Record an important technical decision' states a clear verb ('Record') and resource ('technical decision'), but it's somewhat vague about what constitutes 'recording' versus other actions like logging or documenting. It doesn't distinguish from siblings like 'add_changelog_entry' or 'add_session_step', which might involve similar recording actions.

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, context (e.g., during project planning or code reviews), or exclusions, leaving the agent to infer usage from the tool name alone among many siblings.

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

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