// File generated from our OpenAPI spec by Automated MCP Tools Generator import { EasychampWithAIOptimize } from '../../../easychamp-ai-client'; export const metadata = { resource: 'aioptimize.teams', operation: 'write' as const, tags: ['Team'], httpMethod: 'post', httpPath: '/aioptimize/teams/{name}/player', operationId: 'CreateTeamPlayer', }; export const tool = { name: 'create_team_player_aioptimize_teams', description: 'Creates a new player and associates them with the specified team.', inputSchema: { type: 'object' as const, properties: { name: { type: 'string' as const, description: 'The name of the team for which the player is being created.', }, 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: ['name', 'sportKind'], }, }; export const handler = async (client: EasychampWithAIOptimize, args: Record | undefined) => { const { name, ...body } = args as any; // Use the client's resource method instead of standalone function return client.teams.createTeamPlayer(name, body); }; export default { metadata, tool, handler };