Skip to content

memory_store accepts empty or missing content without validation #216

Description

@loveRhythm1990

Summary

memory_store does not validate that content is present and non-empty before persisting a memory. Calling the tool with an empty body or blank content succeeds and creates a useless memory record.

Steps to Reproduce

  1. Call memory_store with an empty argument object:
    {}
  2. Alternatively, call with an empty string:
    { "content": "" }

Expected Behavior

The API should reject the request with a clear validation error, e.g.:

content is required

Validation should happen before embedding is invoked.

Actual Behavior

The request succeeds and stores an empty memory, e.g.:

Stored memory 019efebd2e9d7ec39a3e95b910e1daab:

Impact

  • Pollutes the memory store with empty records
  • Wastes embedding API calls
  • Makes downstream retrieval noisier

Environment

  • MCP server: http://localhost/memoria-api/mcp
  • Tool: memory_store
  • Discovered during functional testing on 2026-06-25

Suggested Fix

Add server-side validation to reject missing or whitespace-only content before embedding/persistence.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions