// tools/register-usage-tools.ts — Registers usage tracking tools on the MCP server.
// These tools are always accessible (in alwaysAllowed list) — they show usage data.
import { z } from 'zod';
import { safe } from './safe-handler.js';
import { handleUsageStats } from './usage-stats.js';
import { handleUsageReport } from './usage-report.js';
export function registerUsageTools(server) {
    // usage_stats
    server.registerTool('usage_stats', {
        description: 'View your Planu usage statistics — tool calls, top tools, remaining daily calls. ' +
            'Helps you understand how much of your plan you are using.',
        inputSchema: {
            period: z
                .enum(['7d', '30d', 'all'])
                .optional()
                .describe('Time period to analyze. Type: 7d | 30d | all. Defaults to 30d.'),
        },
        annotations: { title: 'Usage Statistics', readOnlyHint: true },
    }, safe(async (args) => handleUsageStats(args)));
    // usage_report
    server.registerTool('usage_report', {
        description: 'Generate a full usage report for your Planu installation. ' +
            'Available in JSON (for integrations) or Markdown (for reading).',
        inputSchema: {
            format: z
                .enum(['json', 'markdown'])
                .optional()
                .describe('Output format. Type: json | markdown. Defaults to markdown.'),
        },
        annotations: { title: 'Usage Report', readOnlyHint: true },
    }, safe(async (args) => handleUsageReport(args)));
}
//# sourceMappingURL=register-usage-tools.js.map