// 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: ['Teams', 'Players', 'Rosters'], httpMethod: 'post', httpPath: '/aioptimize/teams/roster', operationId: 'PostAioptimizeTeamsRoster', }; export const tool = { name: 'post_aioptimize_teams_roster_aioptimize_teams', description: 'Add players to a competition roster', inputSchema: { type: 'object' as const, properties: { champTeamId: { type: 'string' as const, description: 'The ID of the team in the competition (ChampTeam).', format: 'uuid', }, players: { type: 'array' as const, items: { required: ['playerId'], type: 'object' as const, properties: { playerId: { type: 'string' as const, description: 'The ID of the player. First search for players by name before creating new ones.', format: 'uuid', }, position: { type: 'string' as const, description: 'The position of the player in this competition. Optional field.', nullable: true, }, order: { type: 'integer' as const, description: 'The order of the player in the roster. Default is 0.', format: 'int32', }, playerSquadType: { type: 'integer' as const, description: 'The squad type of the player. 0 = Regular, 1 = Substitute. Default is 0.', format: 'int32', }, }, additionalProperties: false, description: 'Data Transfer Object for a player in a team roster.', }, description: 'List of players to add to the roster.', }, }, required: ['champTeamId', 'players'], }, }; 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.teams.postAioptimizeTeamsRoster(body); }; export default { metadata, tool, handler };