Skip to content

fix: add GET /room/memories endpoint + tighten POST /room/recall - #570

Merged
ajianaz merged 1 commit into
developfrom
fix/room-memories-endpoint-569
Jul 5, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/room-memories-endpoint-569

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Closes #569

Summary

Bug: had no chronological fallback — sending an empty query returned zero results silently instead of listing all room memories in order.

Fix (Option B from issue):

1. New endpoint:

  • Chronological listing of all room memories, wrapping existing core function
  • Pure HTTP wiring — zero new core code
  • Query params: (required), (optional), (default 100)
  • Returns 400 with usage hint if missing
  • Cross-namespace (same as existing room endpoints)

2. Tightened

  • Rejects empty/whitespace-only query with HTTP 400
  • Error message points to as the correct endpoint for chronological listing

3. New MCP tool:

  • Chronological room memory listing via MCP
  • Output format: [YYYY-MM-DD HH:MM | namespace] content
  • Same params: (required), (optional), (default 100)

Changes

  • uteke-server/src/handlers.rs — GET /room/memories route + empty query guard on POST /room/recall
  • uteke-server/src/main.rs — Help output updated
  • uteke-mcp/src/lib.rs — uteke_room_memories tool definition + executor

Test plan

  • GET /room/memories?room_id=test returns chronological memories
  • GET /room/memories returns 400 with usage message
  • POST /room/recall { room_id: "x", query: "" } returns 400
  • POST /room/recall { room_id: "x", query: "valid query" } still works
  • MCP uteke_room_memories tool lists memories chronologically

@ajianaz ajianaz added the scope:server uteke-server / uteke-mcp binaries label Jul 5, 2026
let limit = args["limit"].as_u64().unwrap_or(100) as usize;

let memories = uteke
.recall_room(room_id, author, limit)
.and_then(|q| parse_query_param(q, "limit"))
.and_then(|v| v.parse::<usize>().ok())
.unwrap_or(100);
let author = query_str.and_then(|q| parse_query_param(q, "author"));
@github-actions

github-actions Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-cli · BYOK · MIT

- Add GET /room/memories for chronological room memory listing
  - Wraps existing recall_room() core function (zero new core code)
  - Query params: room_id (required), author (optional), limit (default 100)
  - Returns 400 with usage hint if room_id missing
- Tighten POST /room/recall: reject empty query with 400
  - Error message points to GET /room/memories as the correct fallback
- Add uteke_room_memories MCP tool (chronological listing)
  - Same params as HTTP: room_id, optional author, default limit 100
  - Output format: [timestamp | namespace] content
- Update --help output with new endpoint
@ajianaz
ajianaz force-pushed the fix/room-memories-endpoint-569 branch from e7afa0e to 26dd00f Compare July 5, 2026 23:33
@ajianaz
ajianaz merged commit 377c766 into develop Jul 5, 2026
8 checks passed
@ajianaz
ajianaz deleted the fix/room-memories-endpoint-569 branch July 9, 2026 14:27
ajianaz added a commit that referenced this pull request Aug 13, 2026
fix: add GET /room/memories endpoint + tighten POST /room/recall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:server uteke-server / uteke-mcp binaries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: POST /room/recall has no chronological fallback — add GET /room/memories for full room timeline listing

2 participants