agentbay_memory_verify
Verify a memory entry is still accurate — resets confidence decay and increments helpful count. Also supports unhelpful marking and alias management.
Instructions
Verify a memory entry is still accurate — resets confidence decay and increments helpful count. Also supports unhelpful marking and alias management.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID | |
| knowledgeId | Yes | Memory entry ID | |
| action | Yes | Action to perform | |
| aliases | No | Search phrases to add (for add_aliases action) | |
| phrase | No | Alias to remove (for remove_alias action) |
Implementation Reference
- src/index.ts:698-703 (handler)Handler function for the 'agentbay_memory_verify' tool. Calls PATCH /api/v1/projects/${projectId}/memory to verify (or unhelpful/alias-manage) a memory entry.
async ({ projectId, knowledgeId, action, aliases, phrase }) => { const data = await apiPatch(`/api/v1/projects/${projectId}/memory`, { knowledgeId, action, aliases, phrase }); if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] }; return { content: [{ type: 'text' as const, text: `OK: ${data.action}${data.count ? ` (${data.count} aliases)` : ''}` }] }; } ); - src/index.ts:692-697 (schema)Input schema for agentbay_memory_verify tool using Zod validation.
projectId: z.string().describe('Project ID'), knowledgeId: z.string().describe('Memory entry ID'), action: z.enum(['verify', 'unhelpful', 'add_aliases', 'remove_alias']).describe('Action to perform'), aliases: z.array(z.string()).optional().describe('Search phrases to add (for add_aliases action)'), phrase: z.string().optional().describe('Alias to remove (for remove_alias action)'), }, - src/index.ts:688-703 (registration)Registration of the 'agentbay_memory_verify' tool via server.tool() on the McpServer instance.
server.tool( 'agentbay_memory_verify', 'Verify a memory entry is still accurate — resets confidence decay and increments helpful count. Also supports unhelpful marking and alias management.', { projectId: z.string().describe('Project ID'), knowledgeId: z.string().describe('Memory entry ID'), action: z.enum(['verify', 'unhelpful', 'add_aliases', 'remove_alias']).describe('Action to perform'), aliases: z.array(z.string()).optional().describe('Search phrases to add (for add_aliases action)'), phrase: z.string().optional().describe('Alias to remove (for remove_alias action)'), }, async ({ projectId, knowledgeId, action, aliases, phrase }) => { const data = await apiPatch(`/api/v1/projects/${projectId}/memory`, { knowledgeId, action, aliases, phrase }); if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] }; return { content: [{ type: 'text' as const, text: `OK: ${data.action}${data.count ? ` (${data.count} aliases)` : ''}` }] }; } );