// 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/create', operationId: 'CreatePlayerByName', }; export const tool = { name: 'create_player_by_name_aioptimize_player', description: 'Creates a new player using only their full name', inputSchema: { type: 'object' as const, properties: { fullName: { minLength: 1, type: 'string' as const, description: 'The full name of the player. This will be used to set both the display name and parse first/last names.', }, sportKind: { minLength: 1, type: 'string' as const, description: 'The sport kind (e.g., "Football", "Basketball", "Tennis"). This is a required field.', }, 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, }, imageUrl: { type: 'string' as const, description: 'URL to the player\'s photo. Optional field.', nullable: true, }, jerseyNumber: { type: 'integer' as const, description: 'The player\'s jersey number. Optional field.', format: 'int32', nullable: true, }, }, required: ['fullName', '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.createPlayerByName(body); }; export default { metadata, tool, handler };