Skip to content

[upstream PR 894] f<!-- -->ix(mcp): slots flag guard, error detail, and dropped tool params #399

@wbugitlab1

Description

@wbugitlab1

Source: Source pull request number: 894 in rohitg00/agentmemory (URL omitted to avoid GitHub cross-reference)
Title: fix(mcp): slots flag guard, error detail, and dropped tool params
Author: rohitg00
State: open
Draft: no
Merged: no
Head: rohitg00/agentmemory:fix/mcp-slots-and-param-plumbing @ 0ff0309
Base: main @ 25e7701
Labels: (none)
Changed files: 0
Commits: 0
Created: 2026-06-10T22:49:32Z
Updated: 2026-06-10T22:58:32Z
Closed: (not closed)
Merged at: (not merged)

Original PR body:

Closes #888.

Slot tools dispatched to mem::slot-* functions that are only registered when AGENTMEMORY_SLOTS is enabled, so disabled installs got an opaque Internal error instead of guidance. The MCP dispatch now returns the same structured error/flag/enableHow body the REST endpoints already use, and tools/list stops advertising slot tools while the flag is off, so clients no longer see tools that fail by construction.

Also in this change: the dispatch catch-all now includes the underlying error message; memory_save accepts array-typed concepts and files (was string-only split, arrays silently became empty); the standalone shim plumbs the project parameter through validation, the proxied remember body, and the local fallback record; memory_sessions takes a limit (default 20, max 100) and returns the most recent sessions sorted by startedAt descending instead of the full unbounded list.

Tested by test/mcp-tools-call.test.ts plus new cases in the surface default and standalone proxy suites.

Summary by CodeRabbit

  • New Features

    • Optional project parameter for memory save; memory sessions accept a limit and return most-recent first.
  • Improvements

    • Slot-related memory tools are hidden when slots are disabled.
    • Tool error responses include more descriptive internal messages.
    • Parsing of concept/file inputs accepts both arrays and comma-separated strings.
  • Tests

    • Added tests covering slot gating, project forwarding, parsing behavior, and session limits.
  • Documentation

    • Updated tools reference for memory_sessions parameters.

Local branch: review/issue-888-pr-894-slots-guard-errors
Fork PR: not created
Fork decision: adapted for this fork according to local review documentation. Local decision evidence: adapted import.
Verification: see local task record docs/todos/2026-06-15-issue-888-pr-894-slots-guard/todo.md for recorded checks and evidence.
Notes: tracker updated from local review documentation on 2026-06-16; issue remains open until separately closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    decision-modifiedFork adopted a modified versionupstream-openUpstream pull request is openupstream-prTracks an upstream pull request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions