"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.register = register;
const zod_1 = require("zod");
function register(server, mgr) {
    server.registerTool('notes_list_links', {
        description: 'List all relations (incoming and outgoing) for a note. ' +
            'Returns an array of { fromId, toId, kind, targetGraph? }. ' +
            'Cross-graph links include targetGraph ("docs", "code", "files", or "tasks") and resolve the real node ID.',
        inputSchema: {
            noteId: zod_1.z.string().min(1).max(500).describe('Note ID to list relations for'),
        },
    }, async ({ noteId }) => {
        const relations = mgr.listRelations(noteId);
        return { content: [{ type: 'text', text: JSON.stringify(relations, null, 2) }] };
    });
}
