"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.register = register;
function register(server, ctx) {
    server.registerTool('get_context', {
        description: 'Returns the current project and workspace context. ' +
            'Use this to discover which project you are connected to, whether it is part of a workspace, ' +
            'and which other projects are available in the workspace (for cross-graph links with projectId). ' +
            'Returns { projectId, projectDescription, workspaceId, workspaceProjects: string[] | null, hasWorkspace: boolean }.',
        inputSchema: {},
    }, async () => {
        const result = {
            projectId: ctx?.projectId ?? null,
            projectDescription: ctx?.projectDescription ?? null,
            workspaceId: ctx?.workspaceId ?? null,
            workspaceProjects: ctx?.workspaceProjects ?? null,
            hasWorkspace: !!ctx?.workspaceId,
        };
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    });
}
