Skip to main content
Glama

aiana_memory_add

Store new memories with automatic secret scrubbing for privacy. Supports notes, preferences, patterns, and insights while associating them with specific projects.

Instructions

Store a new memory. Content is automatically scrubbed for secrets before embedding and storage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe memory content to store.
memoryTypeNoMemory type. Default: note.
projectNoAssociate memory with a project.

Implementation Reference

  • The core addMemory handler implementation that scrubs sensitive content from the input before delegating to the adapter for embedding and storage.
    export async function addMemory(
      adapter: AianaAdapter,
      content: string,
      opts: { project?: string; memoryType?: string; sessionId?: string } = {},
    ): Promise<string> {
      const clean = scrubSensitive(content);
      return adapter.addMemory(clean, opts);
    }
  • src/app.ts:52-76 (registration)
    Tool registration for aiana_memory_add with name, description, input schema (content, memoryType, project), and execute handler that returns the memory ID with success status.
    {
      name: "aiana_memory_add",
      description:
        "Store a new memory. Content is automatically scrubbed for secrets before embedding and storage.",
      inputSchema: {
        type: "object",
        properties: {
          content:    { type: "string", description: "The memory content to store." },
          memoryType: {
            type: "string",
            enum: ["note", "preference", "pattern", "insight"],
            description: "Memory type. Default: note.",
          },
          project: { type: "string", description: "Associate memory with a project." },
        },
        required: ["content"],
      },
      execute: async (args) => {
        const id = await layers.memories.addMemory(adapter, args.content as string, {
          memoryType: args.memoryType as string | undefined,
          project:    args.project    as string | undefined,
        });
        return { id, stored: true };
      },
    },
  • Execute function that processes the tool arguments, calls the memories layer addMemory, and returns a response with the new memory ID.
    execute: async (args) => {
      const id = await layers.memories.addMemory(adapter, args.content as string, {
        memoryType: args.memoryType as string | undefined,
        project:    args.project    as string | undefined,
      });
      return { id, stored: true };
    },
  • Helper function that redacts sensitive patterns (GitHub tokens, API keys, JWTs, passwords) from text before embedding and storage.
    export function scrubSensitive(text: string): string {
      let result = text;
      for (const [pattern, replacement] of SCRUB_RULES) {
        result = result.replace(pattern, replacement);
      }
      return result;
    }
Behavior4/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. It adds valuable context beyond basic function: it specifies that content is 'automatically scrubbed for secrets before embedding and storage,' which informs about data handling and preprocessing. However, it doesn't cover other behavioral aspects like permissions, rate limits, or error handling.

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 that front-loads the core action ('Store a new memory') and adds a critical behavioral detail ('Content is automatically scrubbed for secrets before embedding and storage') without any wasted words. Every part earns its place by enhancing clarity.

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

Completeness3/5

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

Given no annotations, no output schema, and a mutation tool (adding memory), the description is adequate but has gaps. It covers the basic purpose and a key behavioral trait (scrubbing), but lacks details on return values, error conditions, or integration with sibling tools, making it minimally viable for a tool with 3 parameters and full schema coverage.

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 schema already documents all parameters (content, memoryType, project) with descriptions and an enum for memoryType. The description adds no additional parameter semantics beyond what the schema provides, such as details on scrubbing implementation or project association nuances, meeting the baseline for high coverage.

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 action ('Store a new memory') and resource ('memory'), specifying that content is scrubbed for secrets before embedding and storage. It distinguishes from siblings like 'aiana_memory_delete' or 'aiana_memory_search' by focusing on creation, but doesn't explicitly differentiate from 'aiana_preference_add' which might be a similar add operation for preferences.

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?

No explicit guidance on when to use this tool versus alternatives is provided. It implies usage for storing memories but doesn't mention when to choose it over siblings like 'aiana_memory_import' or 'aiana_preference_add', nor any prerequisites or exclusions.

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/git-fabric/aiana'

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