// tools/register-tool-groups.ts — Registers tool group management tools (SPEC-074)
import { z } from 'zod';
import { safe } from './safe-handler.js';
import { handleActivateGroup, handleListGroups } from './tool-group-handler.js';
/**
 * Registers activate_group and list_groups tools (SPEC-074).
 * These are free-tier tools in the "core" group — always available.
 */
export function registerToolGroupTools(server) {
    server.registerTool('activate_group', {
        description: 'Enable, disable, or toggle a group of tools. ' +
            "Tool groups organize Planu's 80+ tools into workflow categories. " +
            'Only enabled groups appear in the tool list, reducing noise and improving LLM relevance. ' +
            'Groups: core | spec-lifecycle | analysis | generation | orchestration | devops | governance | learning',
        inputSchema: {
            group: z
                .string()
                .describe('Group ID to activate/deactivate. ' +
                'Valid groups: core | spec-lifecycle | analysis | generation | orchestration | devops | governance | learning'),
            action: z
                .enum(['enable', 'disable', 'toggle'])
                .describe('Action: enable | disable | toggle'),
        },
        annotations: {
            title: 'Activate Tool Group',
            readOnlyHint: false,
        },
    }, safe(async (args) => handleActivateGroup(args)));
    server.registerTool('list_groups', {
        description: 'List all tool groups with their status (enabled/disabled), tool count, and descriptions. ' +
            'Shows which groups are active and how many tools are currently visible to the LLM.',
        inputSchema: {},
        annotations: {
            title: 'List Tool Groups',
            readOnlyHint: true,
        },
    }, safe(() => handleListGroups()));
}
//# sourceMappingURL=register-tool-groups.js.map