// 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: 'put', httpPath: '/aioptimize/player/{name}', operationId: 'UpdatePlayer', }; export const tool = { name: 'update_player_aioptimize_player', description: 'Updates the information for the player with the specified name.', inputSchema: { type: 'object' as const, properties: { name: { type: 'string' as const, description: 'The name of the player to be updated.', }, history: { type: 'array' as const, items: { type: 'object' as const, properties: { isActive: { type: 'boolean' as const, }, teamId: { type: 'string' as const, format: 'uuid', nullable: true, }, teamName: { type: 'string' as const, nullable: true, }, jerseyNumber: { type: 'string' as const, nullable: true, }, champId: { type: 'string' as const, format: 'uuid', nullable: true, }, startDate: { type: 'string' as const, format: 'date-time', nullable: true, }, endDate: { type: 'string' as const, format: 'date-time', nullable: true, }, isInternationalTeam: { type: 'boolean' as const, nullable: true, }, type: { enum: ['0', '1'], type: 'string' as const, description: 'PlayerHistoryType object (schema omitted for brevity) (originally integer enum values)', format: 'int32', }, }, additionalProperties: false, }, nullable: true, }, externalId: { type: 'string' as const, nullable: true, }, fullName: { type: 'string' as const, nullable: true, }, firstName: { type: 'string' as const, nullable: true, }, lastName: { type: 'string' as const, nullable: true, }, otherFullName: { type: 'string' as const, nullable: true, }, weight: { type: 'integer' as const, format: 'int32', nullable: true, }, height: { type: 'integer' as const, format: 'int32', nullable: true, }, middleName: { type: 'string' as const, nullable: true, }, doB: { type: 'string' as const, format: 'date-time', nullable: true, }, imageUrl: { type: 'string' as const, nullable: true, }, sportKindId: { type: 'string' as const, format: 'uuid', }, nationality: { type: 'string' as const, nullable: true, }, position: { type: 'string' as const, nullable: true, }, strongFoot: { type: 'string' as const, nullable: true, }, gender: { enum: ['0', '1', '2'], type: 'string' as const, description: 'Gender object (schema omitted for brevity) (originally integer enum values)', format: 'int32', }, parentId: { type: 'string' as const, format: 'uuid', nullable: true, }, isImportCompleted: { type: 'boolean' as const, nullable: true, }, createdBy: { type: 'string' as const, nullable: true, }, }, required: ['name'], }, }; 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.player.updatePlayer(name, body); }; export default { metadata, tool, handler };