knowledge_downvote
Reduce the importance of memory entries in Prism MCP by downvoting specific records to prioritize relevant information.
Instructions
Downvote a memory entry to decrease its importance. Importance cannot go below 0.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The UUID of the ledger entry to downvote. |
Implementation Reference
- The handler function knowledgeDownvoteHandler decreases an entry's importance by calling storage.adjustImportance(args.id, -1).
export async function knowledgeDownvoteHandler(args: unknown) { if (!isKnowledgeVoteArgs(args)) { throw new Error("Invalid arguments for knowledge_downvote"); } const storage = await getStorage(); try { await storage.adjustImportance(args.id, -1, PRISM_USER_ID); debugLog(`[knowledge_downvote] Downvoted entry ${args.id}`); return { content: [{ type: "text", text: `👎 Entry ${args.id} downvoted (-1 importance).` }], isError: false, }; } catch (err) { const msg = err instanceof Error ? err.message : String(err); return { content: [{ type: "text", text: `❌ Failed to downvote entry ${args.id}: ${msg}` }], isError: true, }; } } - Tool definition for knowledge_downvote.
export const KNOWLEDGE_DOWNVOTE_TOOL: Tool = { name: "knowledge_downvote", description: "Downvote a memory entry to decrease its importance. " + "Importance cannot go below 0.", inputSchema: { type: "object", properties: { id: { - src/server.ts:812-814 (registration)The tool "knowledge_downvote" is registered in the main MCP server's callTool request handler.
case "knowledge_downvote": if (!SESSION_MEMORY_ENABLED) throw new Error("Session memory not configured. Set SUPABASE_URL and SUPABASE_KEY."); result = await knowledgeDownvoteHandler(args); break;