// {{ display_name }} MCP server — generated by mcpify. Do not hand-edit.

import type { Command } from 'commander';

import { loadConfig } from '../core/config-manager.js';
import { getCachedStore } from '../data/store-repository.js';
import { getOperation } from '../tools/get-tool.js';

export function registerGetCommand(program: Command): void {
  program
    .command('get <operationId>')
    .description('Show the schema, path, method, and documentation for one operation')
    .action(async (operationId: string) => {
      const config = loadConfig();
      const store = getCachedStore(config.api_version);
      const result = await getOperation(store, operationId);
      console.log(JSON.stringify(result, null, 2));
    });
}
