Memories
Verified request, response and authorization contracts.
There are no /api/memories REST routes in router.go. User memory is exposed through authenticated MCP tools in mcp_memories.go. It always belongs to the authenticated Melso user; there is no workspace-memory, user-selector or container-tag parameter.
Send each operation to POST /api/mcp (or /mcp) with an MCP credential. The HTTP/protocol authentication and errors are described on MCP. Results contain content:[{type:"text",text:string}]; text is produced by the memory service and is not a stable REST entity schema. A missing memory service returns a tool error.
Examples use the environment variables from Overview. UUID placeholders must be replaced with your own IDs.
memories_search
Method/path: POST /api/mcp, JSON-RPC tools/call.
Auth: authenticated MCP user. Arguments: query:string required, nonempty.
Response: text content blocks. Status: 200 JSON-RPC result/tool error; authentication/protocol errors follow the MCP page.
curl -sS "$MELSO_URL/api/mcp" \
-H "Authorization: Bearer $MCP_TOKEN" -H "Content-Type: application/json" \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"memories_search","arguments":{"query":"preferred language"}}}'memories_list
Method/path: POST /api/mcp, JSON-RPC tools/call.
Auth: authenticated MCP user. Arguments: page?:integer, minimum 1, default first page.
Response: text content blocks. Status: 200 JSON-RPC result/tool error; authentication/protocol errors follow the MCP page.
curl -sS "$MELSO_URL/api/mcp" \
-H "Authorization: Bearer $MCP_TOKEN" -H "Content-Type: application/json" \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"memories_list","arguments":{"page":1}}}'memories_save
Method/path: POST /api/mcp, JSON-RPC tools/call.
Auth: authenticated MCP user. Arguments: content:string required, nonempty; static?:boolean for durable traits.
Response: text content blocks. Status: 200 JSON-RPC result/tool error; authentication/protocol errors follow the MCP page.
curl -sS "$MELSO_URL/api/mcp" \
-H "Authorization: Bearer $MCP_TOKEN" -H "Content-Type: application/json" \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"memories_save","arguments":{"content":"Prefers concise updates.","static":false}}}'memories_forget
Method/path: POST /api/mcp, JSON-RPC tools/call.
Auth: authenticated MCP user. Arguments: content:string required, exact memory text.
Response: text content blocks. Status: 200 JSON-RPC result/tool error; authentication/protocol errors follow the MCP page.
curl -sS "$MELSO_URL/api/mcp" \
-H "Authorization: Bearer $MCP_TOKEN" -H "Content-Type: application/json" \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"memories_forget","arguments":{"content":"Prefers concise updates."}}}'