// 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: 'read' as const, tags: ['ChampLeague'], httpMethod: 'get', httpPath: '/aioptimize/champ-leagues/user/leagues', operationId: 'GetUserLeagues', }; export const tool = { name: 'get_user_leagues_aioptimize_champ_leagues', description: 'Retrieve all leagues associated with the authenticated user, with optional filtering by sport. This endpoint respects user-specific access controls.', inputSchema: { type: 'object' as const, properties: { pageSize: { type: 'integer' as const, format: 'int32', default: 48, description: undefined, }, pageIndex: { type: 'integer' as const, format: 'int32', default: 0, description: undefined, }, sportKind: { type: 'string' as const, description: undefined, }, userId: { type: 'string' as const, description: undefined, }, }, }, }; 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.getUserLeagues(body); }; export default { metadata, tool, handler };