mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-11 03:37:56 +00:00
feat(mcp): support metadata in add_memory
This commit is contained in:
parent
bce2d0dc16
commit
39ca1ac190
1 changed files with 2 additions and 1 deletions
|
|
@ -158,12 +158,13 @@ export class SupermemoryClient {
|
|||
|
||||
async createMemory(
|
||||
content: string,
|
||||
metadata?: Record<string, unknown>,
|
||||
): Promise<{ id: string; status: string; containerTag: string }> {
|
||||
try {
|
||||
const result = await this.client.add({
|
||||
content,
|
||||
containerTag: this.containerTag,
|
||||
metadata: { sm_source: MCP_SOURCE },
|
||||
metadata: { ...metadata, sm_source: MCP_SOURCE },
|
||||
})
|
||||
return {
|
||||
id: result.id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue