"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.register = register;
const zod_1 = require("zod");
function register(server, mgr) {
    server.registerTool('notes_delete', {
        description: 'Delete a note from the knowledge graph. ' +
            'Also removes all relations (edges) connected to this note.',
        inputSchema: {
            noteId: zod_1.z.string().min(1).max(500).describe('ID of the note to delete'),
        },
    }, async ({ noteId }) => {
        const deleted = mgr.deleteNote(noteId);
        if (!deleted) {
            return { content: [{ type: 'text', text: 'Note not found' }], isError: true };
        }
        return { content: [{ type: 'text', text: JSON.stringify({ noteId, deleted: true }, null, 2) }] };
    });
}
