Skip to main content
Glama

save_memory

Idempotent

Store important information like project decisions, architecture details, and configurations in long-term memory for future reference and knowledge graph building.

Instructions

중요한 정보를 장기 메모리에 저장합니다. 프로젝트 결정사항, 아키텍처, 설정 등을 기록하세요.

키워드: 기억해, remember, 저장해, save, memorize, keep

💡 저장 후 link_memories로 관련 메모리를 연결하면 지식 그래프가 구축됩니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesMemory key/identifier
valueYesInformation to save
categoryNoMemory category

Implementation Reference

  • The handler function that implements the core logic of the 'save_memory' tool. It extracts arguments, uses MemoryManager to save the memory, and returns success or error response.
    export async function saveMemory(args: { key: string; value: string; category?: string }): Promise<ToolResult> {
      const { key: memoryKey, value: memoryValue, category = 'general' } = args;
    
      try {
        const memoryManager = MemoryManager.getInstance();
        memoryManager.save(memoryKey, memoryValue, category);
    
        return {
          content: [{ type: 'text', text: `✓ Saved: ${memoryKey}\nCategory: ${category}` }]
        };
      } catch (error) {
        return {
          content: [{ type: 'text', text: `✗ Error: ${error instanceof Error ? error.message : 'Unknown error'}` }]
        };
      }
    }
  • The ToolDefinition schema for the 'save_memory' tool, defining name, description, input schema, and annotations used for tool discovery and validation.
    export const saveMemoryDefinition: ToolDefinition = {
      name: 'save_memory',
      description: `중요한 정보를 장기 메모리에 저장합니다. 프로젝트 결정사항, 아키텍처, 설정 등을 기록하세요.
    
    키워드: 기억해, remember, 저장해, save, memorize, keep
    
    💡 저장 후 link_memories로 관련 메모리를 연결하면 지식 그래프가 구축됩니다.`,
      inputSchema: {
        type: 'object',
        properties: {
          key: { type: 'string', description: 'Memory key/identifier' },
          value: { type: 'string', description: 'Information to save' },
          category: { type: 'string', description: 'Memory category', enum: ['project', 'personal', 'code', 'notes'] }
        },
        required: ['key', 'value']
      },
      annotations: {
        title: 'Save Memory',
        audience: ['user', 'assistant'],
        readOnlyHint: false,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: false
      }
    };
  • src/index.ts:161-161 (registration)
    Registration of the saveMemory handler function in the toolHandlers object, enabling dynamic dispatch for tool calls.
    'save_memory': saveMemory,
  • src/index.ts:94-94 (registration)
    Registration of the saveMemoryDefinition in the tools array, making it available via ListTools request.
    saveMemoryDefinition,
Behavior3/5

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

Annotations provide key behavioral hints: readOnlyHint=false (write operation), idempotentHint=true (safe to retry), destructiveHint=false (non-destructive). The description adds value by specifying the type of information to save (e.g., project decisions, architecture) and mentioning the knowledge graph integration, which isn't covered by annotations. However, it lacks details on potential side effects, error conditions, or performance aspects, so it only partially enhances transparency beyond the structured data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and concise, with three sentences that each serve a purpose: stating the tool's function, providing keywords for usage, and suggesting a related action. It avoids redundancy and is front-loaded with the core purpose. A point is deducted because the keyword list could be slightly trimmed or integrated more seamlessly, but overall it's efficient and clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no output schema), the description is reasonably complete. It covers the purpose, usage hints, and integration with 'link_memories', complementing the annotations and schema. However, it doesn't explain the return value or potential errors, which could be useful since there's no output schema. This minor gap prevents a perfect score, but it's sufficient for 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%, with clear descriptions for 'key' (Memory key/identifier), 'value' (Information to save), and 'category' (Memory category with enum values). The description adds minimal semantic context by implying 'value' should contain '중요한 정보' (important information) like project decisions, but this doesn't significantly expand beyond the schema. Since the schema is well-documented, the baseline score of 3 is appropriate, as the description doesn't provide additional parameter insights.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '중요한 정보를 장기 메모리에 저장합니다' (saves important information to long-term memory) and provides examples of what to save (project decisions, architecture, settings). It distinguishes from siblings like 'delete_memory', 'update_memory', and 'list_memories' by focusing on creation. However, it doesn't explicitly contrast with 'create_memory_timeline' or 'prioritize_memory', keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context by listing keywords (e.g., '기억해', 'remember', 'save') and suggesting a follow-up action: '저장 후 link_memories로 관련 메모리를 연결하면 지식 그래프가 구축됩니다' (after saving, use link_memories to connect related memories to build a knowledge graph). This gives practical guidance on when to use it and hints at alternatives like 'link_memories'. However, it doesn't explicitly state when not to use this tool versus other memory-related siblings, such as 'update_memory' for modifications.

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/su-record/hi-ai'

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