LearnNewsExamplesServices
Frontmatter
id7868
titleImplement consistent error handling for Memory Core MCP tools
stateClosed
labels
enhancementai
assigneestobiu
createdAtNov 22, 2025, 10:12 PM
updatedAtNov 22, 2025, 10:20 PM
githubUrlhttps://github.com/neomjs/neo/issues/7868
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 22, 2025, 10:20 PM

Implement consistent error handling for Memory Core MCP tools

Closed v11.9.0 enhancementai
tobiu
tobiu commented on Nov 22, 2025, 10:12 PM

The following tools in ai/mcp/server/memory-core/services/toolService.mjs lack top-level try-catch blocks to ensure a consistent error shape for the MCP server:

Services to Update:

  1. MemoryService.mjs: addMemory, listMemories, queryMemories
  2. SummaryService.mjs: deleteAllSummaries, listSummaries, querySummaries
  3. DatabaseService.mjs: exportDatabase, importDatabase
  4. DatabaseLifecycleService.mjs: startDatabase, stopDatabase

Required Error Shape:

{
    error  : 'Description of the error',
    message: error.message,
    code   : 'ERROR_CODE' // e.g., MEMORY_ADD_ERROR, DATABASE_EXPORT_ERROR
}

Note: SessionService.summarizeSessions already implements this pattern. HealthService.healthcheck handles errors internally to return a health status, but should be reviewed to ensure it doesn't throw raw exceptions.

Task: Wrap the logic of the listed methods in try-catch blocks and return the standardized error object on failure.

tobiu added the enhancement label on Nov 22, 2025, 10:12 PM
tobiu added the ai label on Nov 22, 2025, 10:12 PM
tobiu assigned to @tobiu on Nov 22, 2025, 10:19 PM
tobiu referenced in commit 944c5be - "Implement consistent error handling for Memory Core MCP tools #7868" on Nov 22, 2025, 10:19 PM
tobiu closed this issue on Nov 22, 2025, 10:20 PM