// File generated from our OpenAPI spec by Automated MCP Tools Generator import { EasychampWithAIOptimize } from '../../../easychamp-ai-client'; export const metadata = { resource: 'aioptimize.player', operation: 'write' as const, tags: ['Player'], httpMethod: 'post', httpPath: '/aioptimize/player', operationId: 'CreatePlayer', }; export const tool = { name: 'create_player_aioptimize_player', description: 'Creates a new player with the provided details', inputSchema: { type: 'object' as const, properties: { firstName: { type: 'string' as const, description: 'The player\'s first name. At least one of FirstName or LastName must be provided.', nullable: true, }, lastName: { type: 'string' as const, description: 'The player\'s last name. At least one of FirstName or LastName must be provided.', nullable: true, }, sportKind: { minLength: 1, type: 'string' as const, description: 'The sport kind (e.g., "Football", "Basketball", "Tennis"). This is a required field.', }, champName: { type: 'string' as const, description: 'The name of the championship/competition the player is associated with. Optional field.', nullable: true, }, teamName: { type: 'string' as const, description: 'The name of the team the player belongs to. Optional field.', nullable: true, }, jerseyNumber: { type: 'integer' as const, description: 'The player\'s jersey number. Optional field.', format: 'int32', nullable: true, }, position: { type: 'string' as const, description: 'The player\'s position (e.g., "Forward", "Goalkeeper", "Point Guard"). Optional field.', nullable: true, }, nationality: { type: 'string' as const, description: 'The player\'s nationality. Optional field.', nullable: true, }, dateOfBirth: { type: 'string' as const, description: 'The player\'s date of birth. Optional field. (Format: YYYY-MM-DD)', format: 'date', nullable: true, }, imageUrl: { type: 'string' as const, description: 'URL to the player\'s photo. Optional field.', nullable: true, }, }, required: ['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.player.createPlayer(body); }; export default { metadata, tool, handler };