Skip to content

Instantly share code, notes, and snippets.

@wey-gu
Created December 11, 2025 03:10
Show Gist options
  • Select an option

  • Save wey-gu/b3e3a200199899b0a4844e284c425579 to your computer and use it in GitHub Desktop.

Select an option

Save wey-gu/b3e3a200199899b0a4844e284c425579 to your computer and use it in GitHub Desktop.
Nowledge Mem Create Memory MCP tool note
# Memory Add API - Temporal Metadata Guide

## Overview
The `memory_add` interface allows you to create memories with rich temporal metadata. This guide covers the time-related fields and their proper usage.

## Temporal Fields

### `event_start` (string, optional)
**Description**: When the event/memory content occurred in the real world
**Formats**: 
- Year only: `"2024"`
- Year-Month: `"2024-03"`
- Full date: `"2024-03-15"`

**Examples**:
```json
"event_start": "2023"           // Year-only precision
"event_start": "2023-06"       // Month precision  
"event_start": "2023-06-15"    // Day precision

event_end (string, optional)

Description: When the event ended (for date ranges) Format: Same as event_start Requirement: Must be same or later than event_start

Example:

"event_start": "2023-06-15",
"event_end": "2023-06-16"

temporal_context (string, optional)

Description: Categorizes when the memory content relates to Values: "past", "present", "future", "timeless" Default: Not set

Examples:

"temporal_context": "past"     // Historical events
"temporal_context": "future"  // Planned events
"temporal_context": "present" // Current ongoing situations

Complete Examples

Historical Event (Past)

{
  "content": "Team completed the Q4 2023 product launch successfully",
  "title": "Q4 2023 Launch Success",
  "importance": 0.8,
  "labels": "work,product,launch",
  "event_start": "2023-12-20",
  "temporal_context": "past"
}

Future Planning

{
  "content": "Annual team offsite scheduled for Q2 2025 in Tokyo",
  "title": "2025 Team Offsite",
  "importance": 0.6,
  "labels": "planning,team,travel",
  "event_start": "2025-04-15",
  "event_end": "2025-04-18",
  "temporal_context": "future"
}

Date Range Event

{
  "content": "Three-day architecture summit discussing microservices migration",
  "title": "Architecture Summit 2024",
  "importance": 0.7,
  "labels": "architecture,meeting,planning",
  "event_start": "2024-03-12",
  "event_end": "2024-03-14",
  "temporal_context": "past"
}

Year-Only Precision

{
  "content": "Company achieved 50% market share in European markets",
  "title": "2024 Market Dominance",
  "importance": 0.9,
  "labels": "business,milestone",
  "event_start": "2024",
  "temporal_context": "past"
}

Notes

  • All temporal fields are optional
  • Use the precision level that makes sense for your content
  • temporal_context helps with future search and filtering
  • The system automatically tracks when memories are created (separate from event dates)
@wey-gu
Copy link
Author

wey-gu commented Dec 11, 2025

{
  "type": "object",
  "properties": {
    "content": {
      "description": "Memory content (plain text or markdown)",
      "examples": [
        "Learned about Python async/await patterns"
      ],
      "maxLength": 1792,
      "minLength": 1,
      "type": "string"
    },
    "title": {
      "anyOf": [
        {
          "maxLength": 200,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional title for the memory",
      "examples": [
        "Python Async Patterns"
      ]
    },
    "importance": {
      "default": 0.5,
      "description": "Importance score (0.1=low, 0.5=medium, 0.8=high, 1.0=critical)",
      "maximum": 1,
      "minimum": 0,
      "type": "number"
    },
    "labels": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Comma-separated labels (no spaces in labels)",
      "examples": [
        "work,meeting"
      ]
    },
    "event_start": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "When event occurred. Format: YYYY, YYYY-MM, or YYYY-MM-DD",
      "examples": [
        "2024-03-15"
      ]
    },
    "event_end": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "When event ended (for ranges). Format: YYYY, YYYY-MM, or YYYY-MM-DD",
      "examples": [
        "2024-06-30"
      ]
    },
    "temporal_context": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Temporal context: 'past', 'present', 'future', or 'timeless'",
      "examples": [
        "past"
      ]
    }
  },
  "required": [
    "content"
  ]
}

schema of the memory add tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment