// File generated from our OpenAPI spec by Automated MCP Tools Generator import { EasychampWithAIOptimize } from '../../../easychamp-ai-client'; export const metadata = { resource: 'aioptimize.champ_leagues', operation: 'write' as const, tags: ['ChampLeague'], httpMethod: 'post', httpPath: '/aioptimize/champ-leagues', operationId: 'CreateChampLeague', }; export const tool = { name: 'create_champ_league_aioptimize_champ_leagues', description: 'Creates a new championship league with the provided details. This endpoint creates a new championship league by providing the necessary information in the AISaveChampLeagueDto format.', inputSchema: { type: 'object' as const, properties: { name: { type: 'string' as const, description: 'The name of the league to create (e.g., "May28 League")', }, description: { type: 'string' as const, description: 'Optional description for the league', }, sportKind: { type: 'string' as const, description: 'The sport type for the league (e.g., "Soccer", "Basketball", "Tennis", "Padel")', }, startDate: { type: 'string' as const, description: 'Optional start date in YYYY-MM-DD format', }, endDate: { type: 'string' as const, description: 'Optional end date in YYYY-MM-DD format', }, }, required: ['name', 'sportKind'], }, }; export const handler = async (client: EasychampWithAIOptimize, args: Record | undefined) => { const body = args as any; // Use the client's resource method instead of standalone function return client.champLeagues.createChampLeague(body); }; export default { metadata, tool, handler };