// tools/register-token-tools.ts — Registers token optimization tools on the MCP server (SPEC-082)
import { safe } from './safe-handler.js';
import { handleTokenUsage } from './token-usage-handler.js';
import { TokenUsagePeriodEnum, TokenUsageGroupByEnum } from './schemas/token-optimization.js';
export function registerTokenTools(server) {
    server.registerTool('token_usage', {
        description: 'View token consumption metrics, cache performance, and optimization savings. ' +
            'Shows per-tool breakdown, cache hit rates, compression ratios, and cost estimates.',
        inputSchema: {
            period: TokenUsagePeriodEnum.optional().describe('Time period to analyze. Type: current_session | last_hour | today | all_time. ' +
                'Defaults to current_session.'),
            groupBy: TokenUsageGroupByEnum.optional().describe('How to group results. Type: tool | session. Defaults to tool.'),
        },
        annotations: { title: 'Token Usage', readOnlyHint: true },
    }, safe(async (args) => handleTokenUsage(args)));
}
//# sourceMappingURL=register-token-tools.js.map