// File generated from our OpenAPI spec by Automated MCP Tools Generator import { EasychampWithAIOptimize } from '../../../easychamp-ai-client'; export const metadata = { resource: 'aioptimize.fixture', operation: 'write' as const, tags: ['Fixtures', 'Events'], httpMethod: 'post', httpPath: '/aioptimize/fixture/{id}/event', operationId: 'PostAioptimizeFixtureByIdEvent', }; export const tool = { name: 'post_aioptimize_fixture_by_id_event_aioptimize_fixture', description: 'Add an event to a fixture', inputSchema: { type: 'object' as const, properties: { id: { type: 'string' as const, format: 'uuid', description: 'Fixture ID', }, minute: { minLength: 1, type: 'string' as const, description: 'The minute when the event occurred.', }, stoppageTimeMinute: { type: 'string' as const, description: 'The stoppage time minute when the event occurred. Optional field.', nullable: true, }, isHomeEvent: { type: 'boolean' as const, description: 'Whether the event is for the home team (true) or away team (false).', }, eventType: { minLength: 1, type: 'string' as const, description: 'The type of event. Examples: "scorer", "yellowcard", "redcard", "substitution"', }, note: { type: 'string' as const, description: 'Additional notes about the event. Optional field.', nullable: true, }, champTeamId: { type: 'string' as const, description: 'The ID of the team in the competition (ChampTeam).', format: 'uuid', }, champTeamPlayerId: { type: 'string' as const, description: 'The ID of the player in the competition roster (ChampTeamPlayer).', format: 'uuid', }, champTeamPlayerAssistantId: { type: 'string' as const, description: 'The ID of the assisting player in the competition roster (ChampTeamPlayer). Optional field.', format: 'uuid', nullable: true, }, bodyPart: { type: 'integer' as const, description: 'For goals, the body part used. 0 = Not Specified, 1 = Foot, 2 = Head, 3 = Other. Default is 0.', format: 'int32', }, goalType: { type: 'integer' as const, description: 'For goals, the type of goal. 0 = Regular, 1 = Penalty, 2 = Own Goal, 3 = Free Kick. Default is 0.', format: 'int32', }, points: { type: 'integer' as const, description: 'For goals, the number of points. Default is 1.', format: 'int32', }, }, required: ['id', 'champTeamId', 'champTeamPlayerId', 'eventType', 'isHomeEvent', 'minute'], }, }; export const handler = async (client: EasychampWithAIOptimize, args: Record | undefined) => { const { id, ...body } = args as any; // Use the client's resource method instead of standalone function return client.fixture.postAioptimizeFixtureByIdEvent(id, body); }; export default { metadata, tool, handler };