Skip to content

docs: translate core API reference docs to English (#1693)#1793

Open
nuthalapativarun wants to merge 3 commits into
MemTensor:dev-20260525-v2.0.18from
nuthalapativarun:docs/translate-core-api-en-1693
Open

docs: translate core API reference docs to English (#1693)#1793
nuthalapativarun wants to merge 3 commits into
MemTensor:dev-20260525-v2.0.18from
nuthalapativarun:docs/translate-core-api-en-1693

Conversation

@nuthalapativarun
Copy link
Copy Markdown

Description

Translate the core API reference documentation from Chinese to English.

Files added:

  • docs/en/open_source/open_source_api/core/add_memory.md
  • docs/en/open_source/open_source_api/core/delete_memory.md
  • docs/en/open_source/open_source_api/core/get_memory.md
  • docs/en/open_source/open_source_api/core/get_memory_by_id.md
  • docs/en/open_source/open_source_api/core/search_memory.md

API paths, parameter names, JSON examples, and code blocks are unchanged. Only explanatory text is translated.

Related Issue (Required): Fixes #1693

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • Documentation update

How Has This Been Tested?

  • Pipeline Automated API Test (please provide)

Checklist

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

MCP clients such as Cherry Studio always pass filter:{} in conversation
mode. FastMCP rejects unknown or invalid parameters, returning HTTP 400
"Invalid request parameters". Accept the filter parameter and normalise
an empty dict to None so the call succeeds.

Fixes MemTensor#1718
@hijzy hijzy changed the base branch from main to dev-20260525-v2.0.18 May 27, 2026 09:47
@hijzy
Copy link
Copy Markdown
Collaborator

hijzy commented May 27, 2026

The CI Ruff checks are failing and need to be fixed before this can be merged:

  • tests/api/test_mcp_serve.py has 2 unused imports. ruff check fixed them automatically, which means the committed file is not clean.
  • ruff format --check reports that tests/api/test_mcp_serve.py needs formatting.

Please run locally:

poetry run ruff check --fix tests/api/test_mcp_serve.py
poetry run ruff format tests/api/test_mcp_serve.py

@nuthalapativarun
Copy link
Copy Markdown
Author

Fixed the Ruff lint/format issues in tests/api/test_mcp_serve.py — CI should pass now.

@Memtensor-AI Memtensor-AI added the memos Core MemOS logic (memory, MCP, scheduler, API, database) label May 29, 2026
Copy link
Copy Markdown
Collaborator

@Memtensor-AI Memtensor-AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me review this PR carefully.

Needs changes

The documentation translations look solid, but the code changes have a few issues worth addressing.

Code Issues

1. filter parameter accepted but never passed to mos_core.search() (bug)

src/memos/api/mcp_serve.py — The new filter parameter is normalized (empty dict → None), but then the actual self.mos_core.search(query, user_id, cube_ids) call on the next line never uses it. This means the filter is silently ignored at runtime.

if not filter:
    filter = None
result = self.mos_core.search(query, user_id, cube_ids)  # ← filter not passed

Either pass filter to the search call or remove the parameter until the backend supports it. As-is, this gives users a false sense that filtering works via MCP.

2. Shadowing the built-in filter

The parameter name filter shadows Python's built-in. Consider search_filter or filter_conditions to avoid subtle bugs if the built-in is ever needed inside the function body.

3. Tests validate the current (broken) behavior

tests/api/test_mcp_serve.py — The tests assert mock_mos.search.assert_called_once_with("test query", None, None) which confirms filter is never forwarded. Once the bug above is fixed, these assertions will need updating. Also, the diff is truncated — test_search_memories_passes_user_and_cube_ids appears incomplete.

Documentation Nits

4. Broken admonition syntaxdocs/en/.../get_memory.md line 82:

::note
Developer Tip: ... :::

This mixes two different admonition syntaxes. Should likely be :::note ... ::: (or whichever format the docs framework expects).

5. Dead linkdocs/en/.../get_memory_by_id.md references [**Get Memory List**](./get_memory_list.md) but the actual file is named get_memory.md. This will 404.

Minor

  • The PR description says "Documentation update" but includes a functional code change + new test file. The checklist item "I have added tests" is unchecked despite adding tests — worth ticking for clarity.
  • Consider adding a test case where filter has actual content (e.g., {"tags": {"contains": "x"}}) to verify it will be forwarded correctly once the bug is fixed.

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

Labels

memos Core MemOS logic (memory, MCP, scheduler, API, database)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translate core API docs to English

3 participants