chore: import upstream snapshot with attribution
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:20:55 +08:00
commit d25d482dc2
13754 changed files with 4996608 additions and 0 deletions
@@ -0,0 +1,106 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_EXPECTED_PLAYER_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksExpectedPlayer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksExpectedByPlayerParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksExpectedByPlayerResponse extends ToolResponse {
output: {
expected: SportmonksExpectedPlayer[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksExpectedByPlayerTool: ToolConfig<
SportmonksExpectedByPlayerParams,
SportmonksExpectedByPlayerResponse
> = {
id: 'sportmonks_football_expected_by_player',
name: 'Get Expected xG by Player',
description: 'Retrieve lineup-level expected goals (xG) values per player from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. fixture;player;team;type)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/expected/lineups`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'expected_by_player')
}
return {
success: true,
output: {
expected: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
expected: {
type: 'array',
description: 'Array of player-level expected goals (xG) entries',
items: { type: 'object', properties: SPORTMONKS_EXPECTED_PLAYER_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,106 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_EXPECTED_TEAM_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksExpectedTeam,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksExpectedByTeamParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksExpectedByTeamResponse extends ToolResponse {
output: {
expected: SportmonksExpectedTeam[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksExpectedByTeamTool: ToolConfig<
SportmonksExpectedByTeamParams,
SportmonksExpectedByTeamResponse
> = {
id: 'sportmonks_football_expected_by_team',
name: 'Get Expected xG by Team',
description: 'Retrieve fixture-level expected goals (xG) values per team from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. fixture;participant;type)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/expected/fixtures`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'expected_by_team')
}
return {
success: true,
output: {
expected: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
expected: {
type: 'array',
description: 'Array of team-level expected goals (xG) entries',
items: { type: 'object', properties: SPORTMONKS_EXPECTED_TEAM_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,104 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_COMMENTARY_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksCommentary,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetAllCommentariesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetAllCommentariesResponse extends ToolResponse {
output: {
commentaries: SportmonksCommentary[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetAllCommentariesTool: ToolConfig<
SportmonksGetAllCommentariesParams,
SportmonksGetAllCommentariesResponse
> = {
id: 'sportmonks_football_get_all_commentaries',
name: 'Get All Commentaries',
description: 'Retrieve all textual commentaries available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. fixture;player)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/commentaries`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_all_commentaries')
}
return {
success: true,
output: {
commentaries: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
commentaries: {
type: 'array',
description: 'Array of commentary entries',
items: { type: 'object', properties: SPORTMONKS_COMMENTARY_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,105 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetAllFixturesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetAllFixturesResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetAllFixturesTool: ToolConfig<
SportmonksGetAllFixturesParams,
SportmonksGetAllFixturesResponse
> = {
id: 'sportmonks_football_get_all_fixtures',
name: 'Get All Fixtures',
description: 'Retrieve all football fixtures available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. fixtureLeagues:501)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/fixtures`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_all_fixtures')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of fixture objects',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,105 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_PLAYER_PROPERTIES,
type SportmonksPlayer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetAllPlayersParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetAllPlayersResponse extends ToolResponse {
output: {
players: SportmonksPlayer[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetAllPlayersTool: ToolConfig<
SportmonksGetAllPlayersParams,
SportmonksGetAllPlayersResponse
> = {
id: 'sportmonks_football_get_all_players',
name: 'Get All Players',
description: 'Retrieve all football players available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. nationality;position)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order players by id (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/players`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_all_players')
}
return {
success: true,
output: {
players: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
players: {
type: 'array',
description: 'Array of player objects',
items: { type: 'object', properties: SPORTMONKS_PLAYER_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,104 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_RIVAL_PROPERTIES,
type SportmonksRival,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetAllRivalsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetAllRivalsResponse extends ToolResponse {
output: {
rivals: SportmonksRival[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetAllRivalsTool: ToolConfig<
SportmonksGetAllRivalsParams,
SportmonksGetAllRivalsResponse
> = {
id: 'sportmonks_football_get_all_rivals',
name: 'Get All Rivals',
description: 'Retrieve all teams with their rivals information from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. team;rival)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/rivals`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_all_rivals')
}
return {
success: true,
output: {
rivals: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
rivals: {
type: 'array',
description: 'Array of rival relationships',
items: { type: 'object', properties: SPORTMONKS_RIVAL_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,104 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TEAM_PROPERTIES,
type SportmonksTeam,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetAllTeamsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetAllTeamsResponse extends ToolResponse {
output: {
teams: SportmonksTeam[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetAllTeamsTool: ToolConfig<
SportmonksGetAllTeamsParams,
SportmonksGetAllTeamsResponse
> = {
id: 'sportmonks_football_get_all_teams',
name: 'Get All Teams',
description: 'Retrieve all football teams available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. country;venue)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order teams by id (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/teams`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_all_teams')
}
return {
success: true,
output: {
teams: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
teams: {
type: 'array',
description: 'Array of team objects',
items: { type: 'object', properties: SPORTMONKS_TEAM_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,106 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TRANSFER_RUMOUR_PROPERTIES,
type SportmonksTransferRumour,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetAllTransferRumoursParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetAllTransferRumoursResponse extends ToolResponse {
output: {
transferRumours: SportmonksTransferRumour[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetAllTransferRumoursTool: ToolConfig<
SportmonksGetAllTransferRumoursParams,
SportmonksGetAllTransferRumoursResponse
> = {
id: 'sportmonks_football_get_all_transfer_rumours',
name: 'Get All Transfer Rumours',
description: 'Retrieve all transfer rumours available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;fromTeam;toTeam)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/transfer-rumours`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_all_transfer_rumours')
}
return {
success: true,
output: {
transferRumours: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
transferRumours: {
type: 'array',
description: 'Array of transfer rumour objects',
items: { type: 'object', properties: SPORTMONKS_TRANSFER_RUMOUR_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,105 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TRANSFER_PROPERTIES,
type SportmonksTransfer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetAllTransfersParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetAllTransfersResponse extends ToolResponse {
output: {
transfers: SportmonksTransfer[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetAllTransfersTool: ToolConfig<
SportmonksGetAllTransfersParams,
SportmonksGetAllTransfersResponse
> = {
id: 'sportmonks_football_get_all_transfers',
name: 'Get All Transfers',
description: 'Retrieve all transfers available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;fromTeam;toTeam)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. transferTypes:219,220)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/transfers`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_all_transfers')
}
return {
success: true,
output: {
transfers: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
transfers: {
type: 'array',
description: 'Array of transfer objects',
items: { type: 'object', properties: SPORTMONKS_TRANSFER_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,80 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import { SPORTMONKS_FOOTBALL_BASE_URL } from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetBracketsBySeasonParams extends SportmonksBaseParams {
seasonId: string
}
export interface SportmonksGetBracketsBySeasonResponse extends ToolResponse {
output: {
brackets: Record<string, unknown> | null
}
}
export const sportmonksGetBracketsBySeasonTool: ToolConfig<
SportmonksGetBracketsBySeasonParams,
SportmonksGetBracketsBySeasonResponse
> = {
id: 'sportmonks_football_get_brackets_by_season',
name: 'Get Brackets by Season',
description:
'Retrieve the knockout-stage tournament bracket (stages and progression edges) for a season ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/seasons/${encodeURIComponent(params.seasonId.trim())}/brackets`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_brackets_by_season')
}
return {
success: true,
output: {
brackets: data.data ?? null,
},
}
},
outputs: {
brackets: {
type: 'json',
description:
'Bracket object containing stages (fixtures grouped by knockout round) and edges (progression paths between fixtures)',
},
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_COACH_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksCoach,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetCoachParams extends SportmonksBaseParams {
coachId: string
}
export interface SportmonksGetCoachResponse extends ToolResponse {
output: {
coach: SportmonksCoach | null
}
}
export const sportmonksGetCoachTool: ToolConfig<
SportmonksGetCoachParams,
SportmonksGetCoachResponse
> = {
id: 'sportmonks_football_get_coach',
name: 'Get Coach by ID',
description: 'Retrieve a single football coach by their ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
coachId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the coach',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;teams;statistics)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/coaches/${encodeURIComponent(params.coachId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_coach')
}
return {
success: true,
output: {
coach: data.data ?? null,
},
}
},
outputs: {
coach: {
type: 'object',
description: 'The requested coach object',
properties: SPORTMONKS_COACH_PROPERTIES,
},
},
}
@@ -0,0 +1,104 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_COACH_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksCoach,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetCoachesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetCoachesResponse extends ToolResponse {
output: {
coaches: SportmonksCoach[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetCoachesTool: ToolConfig<
SportmonksGetCoachesParams,
SportmonksGetCoachesResponse
> = {
id: 'sportmonks_football_get_coaches',
name: 'Get Coaches',
description: 'Retrieve all football coaches available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. country;teams)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. coachCountries:462)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/coaches`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_coaches')
}
return {
success: true,
output: {
coaches: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
coaches: {
type: 'array',
description: 'Array of coach objects',
items: { type: 'object', properties: SPORTMONKS_COACH_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_COACH_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksCoach,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetCoachesByCountryParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
countryId: string
}
export interface SportmonksGetCoachesByCountryResponse extends ToolResponse {
output: {
coaches: SportmonksCoach[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetCoachesByCountryTool: ToolConfig<
SportmonksGetCoachesByCountryParams,
SportmonksGetCoachesByCountryResponse
> = {
id: 'sportmonks_football_get_coaches_by_country',
name: 'Get Coaches by Country',
description: 'Retrieve all coaches for a country ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
countryId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the country',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;nationality)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/coaches/countries/${encodeURIComponent(params.countryId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_coaches_by_country')
}
return {
success: true,
output: {
coaches: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
coaches: {
type: 'array',
description: 'Array of coach objects for the country',
items: { type: 'object', properties: SPORTMONKS_COACH_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,84 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_COMMENTARY_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksCommentary,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetCommentariesByFixtureParams extends SportmonksBaseParams {
fixtureId: string
}
export interface SportmonksGetCommentariesByFixtureResponse extends ToolResponse {
output: {
commentaries: SportmonksCommentary[]
}
}
export const sportmonksGetCommentariesByFixtureTool: ToolConfig<
SportmonksGetCommentariesByFixtureParams,
SportmonksGetCommentariesByFixtureResponse
> = {
id: 'sportmonks_football_get_commentaries_by_fixture',
name: 'Get Commentaries by Fixture',
description: 'Retrieve textual commentary for a fixture by fixture ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
fixtureId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the fixture',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;relatedPlayer)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/commentaries/fixtures/${encodeURIComponent(params.fixtureId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_commentaries_by_fixture')
}
return {
success: true,
output: {
commentaries: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
commentaries: {
type: 'array',
description: 'Array of commentary entries for the fixture',
items: { type: 'object', properties: SPORTMONKS_COMMENTARY_PROPERTIES },
},
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_LEAGUE_PROPERTIES,
type SportmonksLeague,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetCurrentLeaguesByTeamParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
teamId: string
}
export interface SportmonksGetCurrentLeaguesByTeamResponse extends ToolResponse {
output: {
leagues: SportmonksLeague[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetCurrentLeaguesByTeamTool: ToolConfig<
SportmonksGetCurrentLeaguesByTeamParams,
SportmonksGetCurrentLeaguesByTeamResponse
> = {
id: 'sportmonks_football_get_current_leagues_by_team',
name: 'Get Current Leagues by Team',
description: 'Retrieve all current leagues for a team ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;currentSeason)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order leagues (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/leagues/teams/${encodeURIComponent(params.teamId.trim())}/current`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_current_leagues_by_team')
}
return {
success: true,
output: {
leagues: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
leagues: {
type: 'array',
description: 'Array of current league objects for the team',
items: { type: 'object', properties: SPORTMONKS_LEAGUE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_EXPECTED_LINEUP_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksExpectedLineup,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetExpectedLineupsByPlayerParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
playerId: string
}
export interface SportmonksGetExpectedLineupsByPlayerResponse extends ToolResponse {
output: {
expectedLineups: SportmonksExpectedLineup[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetExpectedLineupsByPlayerTool: ToolConfig<
SportmonksGetExpectedLineupsByPlayerParams,
SportmonksGetExpectedLineupsByPlayerResponse
> = {
id: 'sportmonks_football_get_expected_lineups_by_player',
name: 'Get Expected Lineups by Player',
description: 'Retrieve the premium expected lineups for a player ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
playerId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the player',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. player;fixture)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/expected-lineups/players/${encodeURIComponent(params.playerId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_expected_lineups_by_player')
}
return {
success: true,
output: {
expectedLineups: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
expectedLineups: {
type: 'array',
description: 'Array of expected lineup entries for the player',
items: { type: 'object', properties: SPORTMONKS_EXPECTED_LINEUP_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_EXPECTED_LINEUP_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksExpectedLineup,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetExpectedLineupsByTeamParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
teamId: string
}
export interface SportmonksGetExpectedLineupsByTeamResponse extends ToolResponse {
output: {
expectedLineups: SportmonksExpectedLineup[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetExpectedLineupsByTeamTool: ToolConfig<
SportmonksGetExpectedLineupsByTeamParams,
SportmonksGetExpectedLineupsByTeamResponse
> = {
id: 'sportmonks_football_get_expected_lineups_by_team',
name: 'Get Expected Lineups by Team',
description: 'Retrieve the premium expected lineups for a team ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. player;fixture)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/expected-lineups/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_expected_lineups_by_team')
}
return {
success: true,
output: {
expectedLineups: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
expectedLineups: {
type: 'array',
description: 'Array of expected lineup entries for the team',
items: { type: 'object', properties: SPORTMONKS_EXPECTED_LINEUP_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,89 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_SQUAD_PROPERTIES,
type SportmonksSquadEntry,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetExtendedTeamSquadParams extends SportmonksBaseParams {
teamId: string
}
export interface SportmonksGetExtendedTeamSquadResponse extends ToolResponse {
output: {
squad: SportmonksSquadEntry[]
}
}
export const sportmonksGetExtendedTeamSquadTool: ToolConfig<
SportmonksGetExtendedTeamSquadParams,
SportmonksGetExtendedTeamSquadResponse
> = {
id: 'sportmonks_football_get_extended_team_squad',
name: 'Get Extended Team Squad',
description: 'Retrieve all squad entries for a team (based on current seasons) by team ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. player;position)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/squads/teams/${encodeURIComponent(params.teamId.trim())}/extended`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_extended_team_squad')
}
return {
success: true,
output: {
squad: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
squad: {
type: 'array',
description: 'Array of extended squad entries for the team',
items: { type: 'object', properties: SPORTMONKS_SQUAD_PROPERTIES },
},
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetFixtureParams extends SportmonksBaseParams {
fixtureId: string
}
export interface SportmonksGetFixtureResponse extends ToolResponse {
output: {
fixture: SportmonksFixture | null
}
}
export const sportmonksGetFixtureTool: ToolConfig<
SportmonksGetFixtureParams,
SportmonksGetFixtureResponse
> = {
id: 'sportmonks_football_get_fixture',
name: 'Get Fixture by ID',
description: 'Retrieve a single football fixture by its ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
fixtureId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the fixture',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores;events;lineups;statistics)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. eventTypes:14)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/fixtures/${encodeURIComponent(params.fixtureId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_fixture')
}
return {
success: true,
output: {
fixture: data.data ?? null,
},
}
},
outputs: {
fixture: {
type: 'object',
description: 'The requested fixture object',
properties: SPORTMONKS_FIXTURE_PROPERTIES,
},
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetFixturesByDateParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
date: string
}
export interface SportmonksGetFixturesByDateResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetFixturesByDateTool: ToolConfig<
SportmonksGetFixturesByDateParams,
SportmonksGetFixturesByDateResponse
> = {
id: 'sportmonks_football_get_fixtures_by_date',
name: 'Get Fixtures by Date',
description: 'Retrieve all football fixtures on a specific date (YYYY-MM-DD) from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
date: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The date to fetch fixtures for, in YYYY-MM-DD format',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores;league)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. fixtureLeagues:501,271)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order fixtures by starting_at (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/fixtures/date/${encodeURIComponent(params.date.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_fixtures_by_date')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of fixture objects for the requested date',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,126 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetFixturesByDateRangeParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
startDate: string
endDate: string
}
export interface SportmonksGetFixturesByDateRangeResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetFixturesByDateRangeTool: ToolConfig<
SportmonksGetFixturesByDateRangeParams,
SportmonksGetFixturesByDateRangeResponse
> = {
id: 'sportmonks_football_get_fixtures_by_date_range',
name: 'Get Fixtures by Date Range',
description:
'Retrieve football fixtures between two dates (YYYY-MM-DD) from Sportmonks. Max range is 100 days.',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
startDate: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Start date in YYYY-MM-DD format',
},
endDate: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'End date in YYYY-MM-DD format (max 100 days after start)',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. fixtureLeagues:501,271)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order fixtures by starting_at (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/fixtures/between/${encodeURIComponent(
params.startDate.trim()
)}/${encodeURIComponent(params.endDate.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_fixtures_by_date_range')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of fixture objects within the requested date range',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,132 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetFixturesByDateRangeForTeamParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
startDate: string
endDate: string
teamId: string
}
export interface SportmonksGetFixturesByDateRangeForTeamResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetFixturesByDateRangeForTeamTool: ToolConfig<
SportmonksGetFixturesByDateRangeForTeamParams,
SportmonksGetFixturesByDateRangeForTeamResponse
> = {
id: 'sportmonks_football_get_fixtures_by_date_range_for_team',
name: 'Get Fixtures by Date Range for Team',
description: 'Retrieve fixtures for a team within a date range (YYYY-MM-DD) from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
startDate: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Start date in YYYY-MM-DD format',
},
endDate: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'End date in YYYY-MM-DD format',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. fixtureLeagues:501)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order fixtures by starting_at (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/fixtures/between/${encodeURIComponent(
params.startDate.trim()
)}/${encodeURIComponent(params.endDate.trim())}/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_fixtures_by_date_range_for_team')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of fixture objects for the team within the date range',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetFixturesByIdsParams extends SportmonksBaseParams {
ids: string
}
export interface SportmonksGetFixturesByIdsResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
}
}
export const sportmonksGetFixturesByIdsTool: ToolConfig<
SportmonksGetFixturesByIdsParams,
SportmonksGetFixturesByIdsResponse
> = {
id: 'sportmonks_football_get_fixtures_by_ids',
name: 'Get Fixtures by Multiple IDs',
description: 'Retrieve multiple football fixtures by a comma-separated list of IDs (max 50)',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
ids: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Comma-separated fixture IDs (e.g. 18535517,18535518). Maximum of 50 IDs',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. fixtureLeagues:501)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/fixtures/multi/${encodeURIComponent(params.ids.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_fixtures_by_ids')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of fixture objects for the requested IDs',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
},
}
@@ -0,0 +1,87 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import { SPORTMONKS_FOOTBALL_BASE_URL } from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetGroupedStandingsByRoundParams extends SportmonksBaseParams {
roundId: string
}
export interface SportmonksGetGroupedStandingsByRoundResponse extends ToolResponse {
output: {
standings: unknown[]
}
}
export const sportmonksGetGroupedStandingsByRoundTool: ToolConfig<
SportmonksGetGroupedStandingsByRoundParams,
SportmonksGetGroupedStandingsByRoundResponse
> = {
id: 'sportmonks_football_get_grouped_standings_by_round',
name: 'Get Grouped Standings by Round',
description:
'Retrieve the standing table for a round ID grouped by group where applicable from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
roundId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the round',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participant;details)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. standingGroups:246697)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/standings/rounds/${encodeURIComponent(params.roundId.trim())}/grouped`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_grouped_standings_by_round')
}
return {
success: true,
output: {
standings: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
standings: {
type: 'json',
description:
'Standings for the round: an array of groups (each with id, name and a standings array) when groups exist, otherwise a flat array of standing entries',
},
},
}
@@ -0,0 +1,125 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetHeadToHeadParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
team1: string
team2: string
}
export interface SportmonksGetHeadToHeadResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetHeadToHeadTool: ToolConfig<
SportmonksGetHeadToHeadParams,
SportmonksGetHeadToHeadResponse
> = {
id: 'sportmonks_football_get_head_to_head',
name: 'Get Head to Head',
description: 'Retrieve the head-to-head fixtures between two teams from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
team1: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The id of the first team',
},
team2: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The id of the second team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order fixtures by starting_at (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/fixtures/head-to-head/${encodeURIComponent(
params.team1.trim()
)}/${encodeURIComponent(params.team2.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_head_to_head')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of head-to-head fixture objects between the two teams',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,80 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetInplayLivescoresParams extends SportmonksBaseParams {}
export interface SportmonksGetInplayLivescoresResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
}
}
export const sportmonksGetInplayLivescoresTool: ToolConfig<
SportmonksGetInplayLivescoresParams,
SportmonksGetInplayLivescoresResponse
> = {
id: 'sportmonks_football_get_inplay_livescores',
name: 'Get Inplay Livescores',
description: 'Retrieve all fixtures that are currently being played (in-play) from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores;events)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. fixtureLeagues:501)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/livescores/inplay`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_inplay_livescores')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of in-play fixture objects',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
},
}
@@ -0,0 +1,106 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_COACH_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksCoach,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLatestCoachesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetLatestCoachesResponse extends ToolResponse {
output: {
coaches: SportmonksCoach[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetLatestCoachesTool: ToolConfig<
SportmonksGetLatestCoachesParams,
SportmonksGetLatestCoachesResponse
> = {
id: 'sportmonks_football_get_latest_coaches',
name: 'Get Last Updated Coaches',
description: 'Retrieve all coaches that have received updates in the past two hours',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;nationality)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/coaches/latest`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_latest_coaches')
}
return {
success: true,
output: {
coaches: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
coaches: {
type: 'array',
description: 'Array of recently updated coach objects',
items: { type: 'object', properties: SPORTMONKS_COACH_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,80 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLatestFixturesParams extends SportmonksBaseParams {}
export interface SportmonksGetLatestFixturesResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
}
}
export const sportmonksGetLatestFixturesTool: ToolConfig<
SportmonksGetLatestFixturesParams,
SportmonksGetLatestFixturesResponse
> = {
id: 'sportmonks_football_get_latest_fixtures',
name: 'Get Latest Updated Fixtures',
description: 'Retrieve all fixtures that have received updates within the last 10 seconds',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. fixtureLeagues:501)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/fixtures/latest`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_latest_fixtures')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of recently updated fixture objects',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
},
}
@@ -0,0 +1,80 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLatestLivescoresParams extends SportmonksBaseParams {}
export interface SportmonksGetLatestLivescoresResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
}
}
export const sportmonksGetLatestLivescoresTool: ToolConfig<
SportmonksGetLatestLivescoresParams,
SportmonksGetLatestLivescoresResponse
> = {
id: 'sportmonks_football_get_latest_livescores',
name: 'Get Latest Updated Livescores',
description: 'Retrieve all livescores that have received updates within the last 10 seconds',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. fixtureLeagues:501)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/livescores/latest`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_latest_livescores')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of recently updated live fixture objects',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
},
}
@@ -0,0 +1,80 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_PLAYER_PROPERTIES,
type SportmonksPlayer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLatestPlayersParams extends SportmonksBaseParams {}
export interface SportmonksGetLatestPlayersResponse extends ToolResponse {
output: {
players: SportmonksPlayer[]
}
}
export const sportmonksGetLatestPlayersTool: ToolConfig<
SportmonksGetLatestPlayersParams,
SportmonksGetLatestPlayersResponse
> = {
id: 'sportmonks_football_get_latest_players',
name: 'Get Last Updated Players',
description: 'Retrieve all players that have received updates in the past two hours',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. nationality;position)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/players/latest`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_latest_players')
}
return {
success: true,
output: {
players: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
players: {
type: 'array',
description: 'Array of recently updated player objects',
items: { type: 'object', properties: SPORTMONKS_PLAYER_PROPERTIES },
},
},
}
@@ -0,0 +1,84 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TOTW_PROPERTIES,
type SportmonksTotw,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLatestTotwParams extends SportmonksBaseParams {
leagueId: string
}
export interface SportmonksGetLatestTotwResponse extends ToolResponse {
output: {
totw: SportmonksTotw[]
}
}
export const sportmonksGetLatestTotwTool: ToolConfig<
SportmonksGetLatestTotwParams,
SportmonksGetLatestTotwResponse
> = {
id: 'sportmonks_football_get_latest_totw',
name: 'Get Latest Team of the Week',
description: 'Retrieve the latest Team of the Week (TOTW) for a league ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
leagueId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the league',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. fixture;team;player;round)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/team-of-the-week/leagues/${encodeURIComponent(params.leagueId.trim())}/latest`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_latest_totw')
}
return {
success: true,
output: {
totw: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
totw: {
type: 'array',
description: 'Array of the latest Team of the Week entries for the league',
items: { type: 'object', properties: SPORTMONKS_TOTW_PROPERTIES },
},
},
}
@@ -0,0 +1,106 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TRANSFER_PROPERTIES,
type SportmonksTransfer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLatestTransfersParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetLatestTransfersResponse extends ToolResponse {
output: {
transfers: SportmonksTransfer[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetLatestTransfersTool: ToolConfig<
SportmonksGetLatestTransfersParams,
SportmonksGetLatestTransfersResponse
> = {
id: 'sportmonks_football_get_latest_transfers',
name: 'Get Latest Transfers',
description: 'Retrieve the latest transfers available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;fromTeam;toTeam)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. transferTypes:219,220)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/transfers/latest`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_latest_transfers')
}
return {
success: true,
output: {
transfers: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
transfers: {
type: 'array',
description: 'Array of the latest transfer objects',
items: { type: 'object', properties: SPORTMONKS_TRANSFER_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_LEAGUE_PROPERTIES,
type SportmonksLeague,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLeagueParams extends SportmonksBaseParams {
leagueId: string
}
export interface SportmonksGetLeagueResponse extends ToolResponse {
output: {
league: SportmonksLeague | null
}
}
export const sportmonksGetLeagueTool: ToolConfig<
SportmonksGetLeagueParams,
SportmonksGetLeagueResponse
> = {
id: 'sportmonks_football_get_league',
name: 'Get League by ID',
description: 'Retrieve a single football league by its ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
leagueId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the league',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;currentSeason;seasons)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/leagues/${encodeURIComponent(params.leagueId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_league')
}
return {
success: true,
output: {
league: data.data ?? null,
},
}
},
outputs: {
league: {
type: 'object',
description: 'The requested league object',
properties: SPORTMONKS_LEAGUE_PROPERTIES,
},
},
}
@@ -0,0 +1,105 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_LEAGUE_PROPERTIES,
type SportmonksLeague,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLeaguesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetLeaguesResponse extends ToolResponse {
output: {
leagues: SportmonksLeague[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetLeaguesTool: ToolConfig<
SportmonksGetLeaguesParams,
SportmonksGetLeaguesResponse
> = {
id: 'sportmonks_football_get_leagues',
name: 'Get Leagues',
description: 'Retrieve all football leagues available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;currentSeason)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order leagues (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/leagues`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_leagues')
}
return {
success: true,
output: {
leagues: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
leagues: {
type: 'array',
description: 'Array of league objects',
items: { type: 'object', properties: SPORTMONKS_LEAGUE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_LEAGUE_PROPERTIES,
type SportmonksLeague,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLeaguesByCountryParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
countryId: string
}
export interface SportmonksGetLeaguesByCountryResponse extends ToolResponse {
output: {
leagues: SportmonksLeague[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetLeaguesByCountryTool: ToolConfig<
SportmonksGetLeaguesByCountryParams,
SportmonksGetLeaguesByCountryResponse
> = {
id: 'sportmonks_football_get_leagues_by_country',
name: 'Get Leagues by Country',
description: 'Retrieve all leagues for a country ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
countryId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the country',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;currentSeason)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order leagues (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/leagues/countries/${encodeURIComponent(params.countryId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_leagues_by_country')
}
return {
success: true,
output: {
leagues: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
leagues: {
type: 'array',
description: 'Array of league objects for the country',
items: { type: 'object', properties: SPORTMONKS_LEAGUE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_LEAGUE_PROPERTIES,
type SportmonksLeague,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLeaguesByDateParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
date: string
}
export interface SportmonksGetLeaguesByDateResponse extends ToolResponse {
output: {
leagues: SportmonksLeague[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetLeaguesByDateTool: ToolConfig<
SportmonksGetLeaguesByDateParams,
SportmonksGetLeaguesByDateResponse
> = {
id: 'sportmonks_football_get_leagues_by_date',
name: 'Get Leagues by Date',
description: 'Retrieve all leagues with fixtures on a given date (YYYY-MM-DD) from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
date: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The fixture date in YYYY-MM-DD format',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;currentSeason)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order leagues (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/leagues/date/${encodeURIComponent(params.date.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_leagues_by_date')
}
return {
success: true,
output: {
leagues: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
leagues: {
type: 'array',
description: 'Array of league objects with fixtures on the requested date',
items: { type: 'object', properties: SPORTMONKS_LEAGUE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_LEAGUE_PROPERTIES,
type SportmonksLeague,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLeaguesByTeamParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
teamId: string
}
export interface SportmonksGetLeaguesByTeamResponse extends ToolResponse {
output: {
leagues: SportmonksLeague[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetLeaguesByTeamTool: ToolConfig<
SportmonksGetLeaguesByTeamParams,
SportmonksGetLeaguesByTeamResponse
> = {
id: 'sportmonks_football_get_leagues_by_team',
name: 'Get Leagues by Team',
description: 'Retrieve all current and historical leagues for a team ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;currentSeason)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order leagues (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/leagues/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_leagues_by_team')
}
return {
success: true,
output: {
leagues: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
leagues: {
type: 'array',
description: 'Array of current and historical league objects for the team',
items: { type: 'object', properties: SPORTMONKS_LEAGUE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,105 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_LEAGUE_PROPERTIES,
type SportmonksLeague,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLiveLeaguesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetLiveLeaguesResponse extends ToolResponse {
output: {
leagues: SportmonksLeague[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetLiveLeaguesTool: ToolConfig<
SportmonksGetLiveLeaguesParams,
SportmonksGetLiveLeaguesResponse
> = {
id: 'sportmonks_football_get_live_leagues',
name: 'Get Live Leagues',
description: 'Retrieve all leagues that have fixtures currently being played from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;currentSeason)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order leagues (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/leagues/live`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_live_leagues')
}
return {
success: true,
output: {
leagues: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
leagues: {
type: 'array',
description: 'Array of currently live league objects',
items: { type: 'object', properties: SPORTMONKS_LEAGUE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,102 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_LIVE_PROBABILITY_PROPERTIES,
type SportmonksLiveProbability,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLiveProbabilitiesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetLiveProbabilitiesResponse extends ToolResponse {
output: {
predictions: SportmonksLiveProbability[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetLiveProbabilitiesTool: ToolConfig<
SportmonksGetLiveProbabilitiesParams,
SportmonksGetLiveProbabilitiesResponse
> = {
id: 'sportmonks_football_get_live_probabilities',
name: 'Get Live Probabilities',
description: 'Retrieve all live (in-play) prediction probabilities from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. type;fixture)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(
`${SPORTMONKS_FOOTBALL_BASE_URL}/predictions/live/probabilities`,
params
),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_live_probabilities')
}
return {
success: true,
output: {
predictions: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
predictions: {
type: 'array',
description: 'Array of live probability prediction objects',
items: { type: 'object', properties: SPORTMONKS_LIVE_PROBABILITY_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,110 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_LIVE_PROBABILITY_PROPERTIES,
type SportmonksLiveProbability,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLiveProbabilitiesByFixtureParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
fixtureId: string
}
export interface SportmonksGetLiveProbabilitiesByFixtureResponse extends ToolResponse {
output: {
predictions: SportmonksLiveProbability[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetLiveProbabilitiesByFixtureTool: ToolConfig<
SportmonksGetLiveProbabilitiesByFixtureParams,
SportmonksGetLiveProbabilitiesByFixtureResponse
> = {
id: 'sportmonks_football_get_live_probabilities_by_fixture',
name: 'Get Live Probabilities by Fixture',
description:
'Retrieve all live (in-play) prediction probabilities for a fixture ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
fixtureId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the fixture',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. type;fixture)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/predictions/live/probabilities/fixtures/${encodeURIComponent(params.fixtureId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_live_probabilities_by_fixture')
}
return {
success: true,
output: {
predictions: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
predictions: {
type: 'array',
description: 'Array of live probability prediction objects for the fixture',
items: { type: 'object', properties: SPORTMONKS_LIVE_PROBABILITY_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STANDING_PROPERTIES,
type SportmonksStanding,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLiveStandingsByLeagueParams extends SportmonksBaseParams {
leagueId: string
}
export interface SportmonksGetLiveStandingsByLeagueResponse extends ToolResponse {
output: {
standings: SportmonksStanding[]
}
}
export const sportmonksGetLiveStandingsByLeagueTool: ToolConfig<
SportmonksGetLiveStandingsByLeagueParams,
SportmonksGetLiveStandingsByLeagueResponse
> = {
id: 'sportmonks_football_get_live_standings_by_league',
name: 'Get Live Standings by League',
description: 'Retrieve the live standing table for a league ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
leagueId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the league',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participant;details)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. standingGroups:246697)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/standings/live/leagues/${encodeURIComponent(params.leagueId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_live_standings_by_league')
}
return {
success: true,
output: {
standings: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
standings: {
type: 'array',
description: 'Array of live standing entries for the league',
items: { type: 'object', properties: SPORTMONKS_STANDING_PROPERTIES },
},
},
}
@@ -0,0 +1,80 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetLivescoresParams extends SportmonksBaseParams {}
export interface SportmonksGetLivescoresResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
}
}
export const sportmonksGetLivescoresTool: ToolConfig<
SportmonksGetLivescoresParams,
SportmonksGetLivescoresResponse
> = {
id: 'sportmonks_football_get_livescores',
name: 'Get Livescores',
description:
'Retrieve fixtures starting within 15 minutes and currently in progress from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participants;scores;events)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. fixtureLeagues:501)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/livescores`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_livescores')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of live fixture objects',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
},
}
@@ -0,0 +1,104 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_MATCH_FACT_PROPERTIES,
type SportmonksMatchFact,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetMatchFactsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetMatchFactsResponse extends ToolResponse {
output: {
matchFacts: SportmonksMatchFact[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetMatchFactsTool: ToolConfig<
SportmonksGetMatchFactsParams,
SportmonksGetMatchFactsResponse
> = {
id: 'sportmonks_football_get_match_facts',
name: 'Get All Match Facts',
description: 'Retrieve all available match facts within your Sportmonks subscription (beta)',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. type;sport;fixture)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. matchFactTypes:76088)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/match-facts`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_match_facts')
}
return {
success: true,
output: {
matchFacts: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
matchFacts: {
type: 'array',
description: 'Array of match fact objects',
items: { type: 'object', properties: SPORTMONKS_MATCH_FACT_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,124 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_MATCH_FACT_PROPERTIES,
type SportmonksMatchFact,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetMatchFactsByDateRangeParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
startDate: string
endDate: string
}
export interface SportmonksGetMatchFactsByDateRangeResponse extends ToolResponse {
output: {
matchFacts: SportmonksMatchFact[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetMatchFactsByDateRangeTool: ToolConfig<
SportmonksGetMatchFactsByDateRangeParams,
SportmonksGetMatchFactsByDateRangeResponse
> = {
id: 'sportmonks_football_get_match_facts_by_date_range',
name: 'Get Match Facts by Date Range',
description: 'Retrieve match facts within a date range (YYYY-MM-DD) from Sportmonks (beta)',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
startDate: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Start date in YYYY-MM-DD format',
},
endDate: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'End date in YYYY-MM-DD format',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. type;sport;fixture)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. matchFactTypes:76088)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/match-facts/fixtures/between/${encodeURIComponent(
params.startDate.trim()
)}/${encodeURIComponent(params.endDate.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_match_facts_by_date_range')
}
return {
success: true,
output: {
matchFacts: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
matchFacts: {
type: 'array',
description: 'Array of match fact objects within the date range',
items: { type: 'object', properties: SPORTMONKS_MATCH_FACT_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_MATCH_FACT_PROPERTIES,
type SportmonksMatchFact,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetMatchFactsByFixtureParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
fixtureId: string
}
export interface SportmonksGetMatchFactsByFixtureResponse extends ToolResponse {
output: {
matchFacts: SportmonksMatchFact[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetMatchFactsByFixtureTool: ToolConfig<
SportmonksGetMatchFactsByFixtureParams,
SportmonksGetMatchFactsByFixtureResponse
> = {
id: 'sportmonks_football_get_match_facts_by_fixture',
name: 'Get Match Facts by Fixture',
description: 'Retrieve match facts for a fixture ID from Sportmonks (beta)',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
fixtureId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the fixture',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. type;sport;fixture)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. matchFactTypes:76088)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/match-facts/${encodeURIComponent(params.fixtureId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_match_facts_by_fixture')
}
return {
success: true,
output: {
matchFacts: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
matchFacts: {
type: 'array',
description: 'Array of match fact objects for the fixture',
items: { type: 'object', properties: SPORTMONKS_MATCH_FACT_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_MATCH_FACT_PROPERTIES,
type SportmonksMatchFact,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetMatchFactsByLeagueParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
leagueId: string
}
export interface SportmonksGetMatchFactsByLeagueResponse extends ToolResponse {
output: {
matchFacts: SportmonksMatchFact[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetMatchFactsByLeagueTool: ToolConfig<
SportmonksGetMatchFactsByLeagueParams,
SportmonksGetMatchFactsByLeagueResponse
> = {
id: 'sportmonks_football_get_match_facts_by_league',
name: 'Get Match Facts by League',
description: 'Retrieve match facts for a league ID from Sportmonks (beta)',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
leagueId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the league',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. type;sport;fixture)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. matchFactTypes:76088)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/match-facts/leagues/${encodeURIComponent(params.leagueId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_match_facts_by_league')
}
return {
success: true,
output: {
matchFacts: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
matchFacts: {
type: 'array',
description: 'Array of match fact objects for the league',
items: { type: 'object', properties: SPORTMONKS_MATCH_FACT_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FIXTURE_PROPERTIES,
SPORTMONKS_FOOTBALL_BASE_URL,
type SportmonksFixture,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetPastFixturesByTvStationParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
tvStationId: string
}
export interface SportmonksGetPastFixturesByTvStationResponse extends ToolResponse {
output: {
fixtures: SportmonksFixture[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetPastFixturesByTvStationTool: ToolConfig<
SportmonksGetPastFixturesByTvStationParams,
SportmonksGetPastFixturesByTvStationResponse
> = {
id: 'sportmonks_football_get_past_fixtures_by_tv_station',
name: 'Get Past Fixtures by TV Station',
description: 'Retrieve all past fixtures that were available for a TV station ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
tvStationId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the TV station',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. participants)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. fixtureLeagues:501)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/fixtures/past/tv-stations/${encodeURIComponent(params.tvStationId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_past_fixtures_by_tv_station')
}
return {
success: true,
output: {
fixtures: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
fixtures: {
type: 'array',
description: 'Array of past fixture objects for the TV station',
items: { type: 'object', properties: SPORTMONKS_FIXTURE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_PLAYER_PROPERTIES,
type SportmonksPlayer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetPlayerParams extends SportmonksBaseParams {
playerId: string
}
export interface SportmonksGetPlayerResponse extends ToolResponse {
output: {
player: SportmonksPlayer | null
}
}
export const sportmonksGetPlayerTool: ToolConfig<
SportmonksGetPlayerParams,
SportmonksGetPlayerResponse
> = {
id: 'sportmonks_football_get_player',
name: 'Get Player by ID',
description: 'Retrieve a single football player by their ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
playerId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the player',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;position;teams.team;statistics)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/players/${encodeURIComponent(params.playerId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_player')
}
return {
success: true,
output: {
player: data.data ?? null,
},
}
},
outputs: {
player: {
type: 'object',
description: 'The requested player object',
properties: SPORTMONKS_PLAYER_PROPERTIES,
},
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_PLAYER_PROPERTIES,
type SportmonksPlayer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetPlayersByCountryParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
countryId: string
}
export interface SportmonksGetPlayersByCountryResponse extends ToolResponse {
output: {
players: SportmonksPlayer[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetPlayersByCountryTool: ToolConfig<
SportmonksGetPlayersByCountryParams,
SportmonksGetPlayersByCountryResponse
> = {
id: 'sportmonks_football_get_players_by_country',
name: 'Get Players by Country',
description: 'Retrieve all players for a country ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
countryId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the country',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. nationality;position)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order players by id (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/players/countries/${encodeURIComponent(params.countryId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_players_by_country')
}
return {
success: true,
output: {
players: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
players: {
type: 'array',
description: 'Array of player objects for the country',
items: { type: 'object', properties: SPORTMONKS_PLAYER_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,106 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_NEWS_PROPERTIES,
type SportmonksNews,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetPostmatchNewsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetPostmatchNewsResponse extends ToolResponse {
output: {
news: SportmonksNews[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetPostmatchNewsTool: ToolConfig<
SportmonksGetPostmatchNewsParams,
SportmonksGetPostmatchNewsResponse
> = {
id: 'sportmonks_football_get_postmatch_news',
name: 'Get Post-Match News',
description:
'Retrieve all post-match news articles available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. fixture;league)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. newsitemLeagues:8)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order news by id (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/news/post-match`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_postmatch_news')
}
return {
success: true,
output: {
news: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
news: {
type: 'array',
description: 'Array of post-match news articles',
items: { type: 'object', properties: SPORTMONKS_NEWS_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_NEWS_PROPERTIES,
type SportmonksNews,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetPostmatchNewsBySeasonParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
seasonId: string
}
export interface SportmonksGetPostmatchNewsBySeasonResponse extends ToolResponse {
output: {
news: SportmonksNews[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetPostmatchNewsBySeasonTool: ToolConfig<
SportmonksGetPostmatchNewsBySeasonParams,
SportmonksGetPostmatchNewsBySeasonResponse
> = {
id: 'sportmonks_football_get_postmatch_news_by_season',
name: 'Get Post-Match News by Season',
description: 'Retrieve all post-match news articles for a season ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. fixture;league)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. newsitemLeagues:8)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order news (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/news/post-match/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_postmatch_news_by_season')
}
return {
success: true,
output: {
news: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
news: {
type: 'array',
description: 'Array of post-match news articles for the season',
items: { type: 'object', properties: SPORTMONKS_NEWS_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_PREDICTABILITY_PROPERTIES,
type SportmonksPredictability,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetPredictabilityByLeagueParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
leagueId: string
}
export interface SportmonksGetPredictabilityByLeagueResponse extends ToolResponse {
output: {
predictability: SportmonksPredictability[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetPredictabilityByLeagueTool: ToolConfig<
SportmonksGetPredictabilityByLeagueParams,
SportmonksGetPredictabilityByLeagueResponse
> = {
id: 'sportmonks_football_get_predictability_by_league',
name: 'Get Predictability by League',
description: 'Retrieve the predictions model performance for a league ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
leagueId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the league',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. type;league)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. predictabilityTypes:245)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/predictions/predictability/leagues/${encodeURIComponent(params.leagueId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_predictability_by_league')
}
return {
success: true,
output: {
predictability: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
predictability: {
type: 'array',
description: 'Array of predictability records for the league',
items: { type: 'object', properties: SPORTMONKS_PREDICTABILITY_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,105 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_NEWS_PROPERTIES,
type SportmonksNews,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetPrematchNewsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetPrematchNewsResponse extends ToolResponse {
output: {
news: SportmonksNews[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetPrematchNewsTool: ToolConfig<
SportmonksGetPrematchNewsParams,
SportmonksGetPrematchNewsResponse
> = {
id: 'sportmonks_football_get_prematch_news',
name: 'Get Pre-Match News',
description: 'Retrieve all pre-match news articles available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. fixture;league)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. newsitemLeagues:8)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order news by id (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/news/pre-match`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_prematch_news')
}
return {
success: true,
output: {
news: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
news: {
type: 'array',
description: 'Array of pre-match news articles',
items: { type: 'object', properties: SPORTMONKS_NEWS_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_NEWS_PROPERTIES,
type SportmonksNews,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetPrematchNewsBySeasonParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
seasonId: string
}
export interface SportmonksGetPrematchNewsBySeasonResponse extends ToolResponse {
output: {
news: SportmonksNews[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetPrematchNewsBySeasonTool: ToolConfig<
SportmonksGetPrematchNewsBySeasonParams,
SportmonksGetPrematchNewsBySeasonResponse
> = {
id: 'sportmonks_football_get_prematch_news_by_season',
name: 'Get Pre-Match News by Season',
description: 'Retrieve all pre-match news articles for a season ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. fixture;league)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. newsitemLeagues:8)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order news (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/news/pre-match/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_prematch_news_by_season')
}
return {
success: true,
output: {
news: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
news: {
type: 'array',
description: 'Array of pre-match news articles for the season',
items: { type: 'object', properties: SPORTMONKS_NEWS_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,105 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_NEWS_PROPERTIES,
type SportmonksNews,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetPrematchNewsUpcomingParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetPrematchNewsUpcomingResponse extends ToolResponse {
output: {
news: SportmonksNews[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetPrematchNewsUpcomingTool: ToolConfig<
SportmonksGetPrematchNewsUpcomingParams,
SportmonksGetPrematchNewsUpcomingResponse
> = {
id: 'sportmonks_football_get_prematch_news_upcoming',
name: 'Get Pre-Match News for Upcoming Fixtures',
description: 'Retrieve all pre-match news articles for upcoming fixtures from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. fixture;league)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. newsitemLeagues:8)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order news (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/news/pre-match/upcoming`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_prematch_news_upcoming')
}
return {
success: true,
output: {
news: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
news: {
type: 'array',
description: 'Array of pre-match news articles for upcoming fixtures',
items: { type: 'object', properties: SPORTMONKS_NEWS_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,106 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_PREDICTION_PROPERTIES,
type SportmonksPrediction,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetProbabilitiesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetProbabilitiesResponse extends ToolResponse {
output: {
predictions: SportmonksPrediction[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetProbabilitiesTool: ToolConfig<
SportmonksGetProbabilitiesParams,
SportmonksGetProbabilitiesResponse
> = {
id: 'sportmonks_football_get_probabilities',
name: 'Get Probabilities',
description:
'Retrieve all prediction probabilities available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. type;fixture)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. predictionTypes:236)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/predictions/probabilities`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_probabilities')
}
return {
success: true,
output: {
predictions: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
predictions: {
type: 'array',
description: 'Array of prediction probability objects',
items: { type: 'object', properties: SPORTMONKS_PREDICTION_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_PREDICTION_PROPERTIES,
type SportmonksPrediction,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetProbabilitiesByFixtureParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
fixtureId: string
}
export interface SportmonksGetProbabilitiesByFixtureResponse extends ToolResponse {
output: {
predictions: SportmonksPrediction[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetProbabilitiesByFixtureTool: ToolConfig<
SportmonksGetProbabilitiesByFixtureParams,
SportmonksGetProbabilitiesByFixtureResponse
> = {
id: 'sportmonks_football_get_probabilities_by_fixture',
name: 'Get Predictions by Fixture',
description: 'Retrieve prediction probabilities for a fixture by fixture ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
fixtureId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the fixture',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. type;fixture)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. predictionTypes:236)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/predictions/probabilities/fixtures/${encodeURIComponent(params.fixtureId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_probabilities_by_fixture')
}
return {
success: true,
output: {
predictions: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
predictions: {
type: 'array',
description: 'Array of prediction probability entries for the fixture',
items: { type: 'object', properties: SPORTMONKS_PREDICTION_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,89 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_REFEREE_PROPERTIES,
type SportmonksReferee,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetRefereeParams extends SportmonksBaseParams {
refereeId: string
}
export interface SportmonksGetRefereeResponse extends ToolResponse {
output: {
referee: SportmonksReferee | null
}
}
export const sportmonksGetRefereeTool: ToolConfig<
SportmonksGetRefereeParams,
SportmonksGetRefereeResponse
> = {
id: 'sportmonks_football_get_referee',
name: 'Get Referee by ID',
description: 'Retrieve a single football referee by their ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
refereeId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the referee',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. country;statistics)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/referees/${encodeURIComponent(params.refereeId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_referee')
}
return {
success: true,
output: {
referee: data.data ?? null,
},
}
},
outputs: {
referee: {
type: 'object',
description: 'The requested referee object',
properties: SPORTMONKS_REFEREE_PROPERTIES,
},
},
}
@@ -0,0 +1,104 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_REFEREE_PROPERTIES,
type SportmonksReferee,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetRefereesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetRefereesResponse extends ToolResponse {
output: {
referees: SportmonksReferee[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetRefereesTool: ToolConfig<
SportmonksGetRefereesParams,
SportmonksGetRefereesResponse
> = {
id: 'sportmonks_football_get_referees',
name: 'Get Referees',
description: 'Retrieve all football referees available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. country;statistics)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. refereeCountries:44)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/referees`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_referees')
}
return {
success: true,
output: {
referees: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
referees: {
type: 'array',
description: 'Array of referee objects',
items: { type: 'object', properties: SPORTMONKS_REFEREE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_REFEREE_PROPERTIES,
type SportmonksReferee,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetRefereesByCountryParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
countryId: string
}
export interface SportmonksGetRefereesByCountryResponse extends ToolResponse {
output: {
referees: SportmonksReferee[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetRefereesByCountryTool: ToolConfig<
SportmonksGetRefereesByCountryParams,
SportmonksGetRefereesByCountryResponse
> = {
id: 'sportmonks_football_get_referees_by_country',
name: 'Get Referees by Country',
description: 'Retrieve all referees for a country ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
countryId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the country',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;nationality)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/referees/countries/${encodeURIComponent(params.countryId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_referees_by_country')
}
return {
success: true,
output: {
referees: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
referees: {
type: 'array',
description: 'Array of referee objects for the country',
items: { type: 'object', properties: SPORTMONKS_REFEREE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_REFEREE_PROPERTIES,
type SportmonksReferee,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetRefereesBySeasonParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
seasonId: string
}
export interface SportmonksGetRefereesBySeasonResponse extends ToolResponse {
output: {
referees: SportmonksReferee[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetRefereesBySeasonTool: ToolConfig<
SportmonksGetRefereesBySeasonParams,
SportmonksGetRefereesBySeasonResponse
> = {
id: 'sportmonks_football_get_referees_by_season',
name: 'Get Referees by Season',
description: 'Retrieve all referees for a season ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;nationality)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/referees/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_referees_by_season')
}
return {
success: true,
output: {
referees: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
referees: {
type: 'array',
description: 'Array of referee objects for the season',
items: { type: 'object', properties: SPORTMONKS_REFEREE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,83 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_RIVAL_PROPERTIES,
type SportmonksRival,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetRivalsByTeamParams extends SportmonksBaseParams {
teamId: string
}
export interface SportmonksGetRivalsByTeamResponse extends ToolResponse {
output: {
rivals: SportmonksRival[]
}
}
export const sportmonksGetRivalsByTeamTool: ToolConfig<
SportmonksGetRivalsByTeamParams,
SportmonksGetRivalsByTeamResponse
> = {
id: 'sportmonks_football_get_rivals_by_team',
name: 'Get Rivals by Team',
description: 'Retrieve rival teams for a team by team ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. team;rival)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/rivals/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_rivals_by_team')
}
return {
success: true,
output: {
rivals: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
rivals: {
type: 'array',
description: 'Array of rival relationships for the team',
items: { type: 'object', properties: SPORTMONKS_RIVAL_PROPERTIES },
},
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_ROUND_PROPERTIES,
type SportmonksRound,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetRoundParams extends SportmonksBaseParams {
roundId: string
}
export interface SportmonksGetRoundResponse extends ToolResponse {
output: {
round: SportmonksRound | null
}
}
export const sportmonksGetRoundTool: ToolConfig<
SportmonksGetRoundParams,
SportmonksGetRoundResponse
> = {
id: 'sportmonks_football_get_round',
name: 'Get Round by ID',
description: 'Retrieve a single football round by its ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
roundId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the round',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. league;season;stage;fixtures)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/rounds/${encodeURIComponent(params.roundId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_round')
}
return {
success: true,
output: {
round: data.data ?? null,
},
}
},
outputs: {
round: {
type: 'object',
description: 'The requested round object',
properties: SPORTMONKS_ROUND_PROPERTIES,
},
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STATISTIC_PROPERTIES,
type SportmonksStatistic,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetRoundStatisticsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
roundId: string
}
export interface SportmonksGetRoundStatisticsResponse extends ToolResponse {
output: {
statistics: SportmonksStatistic[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetRoundStatisticsTool: ToolConfig<
SportmonksGetRoundStatisticsParams,
SportmonksGetRoundStatisticsResponse
> = {
id: 'sportmonks_football_get_round_statistics',
name: 'Get Round Statistics',
description: 'Retrieve all available statistics for a round ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
roundId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the round',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. participant)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. seasonstatisticTypes:52,88)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/statistics/rounds/${encodeURIComponent(params.roundId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_round_statistics')
}
return {
success: true,
output: {
statistics: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
statistics: {
type: 'array',
description: 'Array of statistic entries for the round',
items: { type: 'object', properties: SPORTMONKS_STATISTIC_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,105 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_ROUND_PROPERTIES,
type SportmonksRound,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetRoundsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetRoundsResponse extends ToolResponse {
output: {
rounds: SportmonksRound[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetRoundsTool: ToolConfig<
SportmonksGetRoundsParams,
SportmonksGetRoundsResponse
> = {
id: 'sportmonks_football_get_rounds',
name: 'Get Rounds',
description: 'Retrieve all football rounds available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. league;season;stage)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. roundSeasons:19735)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/rounds`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_rounds')
}
return {
success: true,
output: {
rounds: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
rounds: {
type: 'array',
description: 'Array of round objects',
items: { type: 'object', properties: SPORTMONKS_ROUND_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,89 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_ROUND_PROPERTIES,
type SportmonksRound,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetRoundsBySeasonParams extends SportmonksBaseParams {
seasonId: string
}
export interface SportmonksGetRoundsBySeasonResponse extends ToolResponse {
output: {
rounds: SportmonksRound[]
}
}
export const sportmonksGetRoundsBySeasonTool: ToolConfig<
SportmonksGetRoundsBySeasonParams,
SportmonksGetRoundsBySeasonResponse
> = {
id: 'sportmonks_football_get_rounds_by_season',
name: 'Get Rounds by Season',
description: 'Retrieve all rounds for a season ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. league;stage)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/rounds/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_rounds_by_season')
}
return {
success: true,
output: {
rounds: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
rounds: {
type: 'array',
description: 'Array of round objects for the season',
items: { type: 'object', properties: SPORTMONKS_ROUND_PROPERTIES },
},
},
}
@@ -0,0 +1,73 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import { SPORTMONKS_FOOTBALL_BASE_URL } from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetSchedulesBySeasonParams extends SportmonksBaseParams {
seasonId: string
}
export interface SportmonksGetSchedulesBySeasonResponse extends ToolResponse {
output: {
schedules: unknown[]
}
}
export const sportmonksGetSchedulesBySeasonTool: ToolConfig<
SportmonksGetSchedulesBySeasonParams,
SportmonksGetSchedulesBySeasonResponse
> = {
id: 'sportmonks_football_get_schedules_by_season',
name: 'Get Schedules by Season',
description: 'Retrieve the full schedule (stages, rounds and fixtures) for a season by season ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/schedules/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_schedules_by_season')
}
return {
success: true,
output: {
schedules: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
schedules: {
type: 'json',
description:
'Array of stages, each with nested rounds and their fixtures (participants, scores)',
},
},
}
@@ -0,0 +1,82 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import { SPORTMONKS_FOOTBALL_BASE_URL } from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetSchedulesBySeasonAndTeamParams extends SportmonksBaseParams {
seasonId: string
teamId: string
}
export interface SportmonksGetSchedulesBySeasonAndTeamResponse extends ToolResponse {
output: {
schedules: unknown[]
}
}
export const sportmonksGetSchedulesBySeasonAndTeamTool: ToolConfig<
SportmonksGetSchedulesBySeasonAndTeamParams,
SportmonksGetSchedulesBySeasonAndTeamResponse
> = {
id: 'sportmonks_football_get_schedules_by_season_and_team',
name: 'Get Schedules by Season and Team',
description: 'Retrieve the full season schedule for a specific team by season ID and team ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/schedules/seasons/${encodeURIComponent(
params.seasonId.trim()
)}/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_schedules_by_season_and_team')
}
return {
success: true,
output: {
schedules: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
schedules: {
type: 'json',
description:
'Array of stages, each with nested rounds and their fixtures for the team in the season',
},
},
}
@@ -0,0 +1,73 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import { SPORTMONKS_FOOTBALL_BASE_URL } from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetSchedulesByTeamParams extends SportmonksBaseParams {
teamId: string
}
export interface SportmonksGetSchedulesByTeamResponse extends ToolResponse {
output: {
schedules: unknown[]
}
}
export const sportmonksGetSchedulesByTeamTool: ToolConfig<
SportmonksGetSchedulesByTeamParams,
SportmonksGetSchedulesByTeamResponse
> = {
id: 'sportmonks_football_get_schedules_by_team',
name: 'Get Schedules by Team',
description: 'Retrieve the full schedule (stages, rounds and fixtures) for a team by team ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/schedules/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_schedules_by_team')
}
return {
success: true,
output: {
schedules: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
schedules: {
type: 'json',
description:
'Array of stages, each with nested rounds and their fixtures (participants, scores)',
},
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_SEASON_PROPERTIES,
type SportmonksSeason,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetSeasonParams extends SportmonksBaseParams {
seasonId: string
}
export interface SportmonksGetSeasonResponse extends ToolResponse {
output: {
season: SportmonksSeason | null
}
}
export const sportmonksGetSeasonTool: ToolConfig<
SportmonksGetSeasonParams,
SportmonksGetSeasonResponse
> = {
id: 'sportmonks_football_get_season',
name: 'Get Season by ID',
description: 'Retrieve a single football season by its ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. league;stages;fixtures)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_season')
}
return {
success: true,
output: {
season: data.data ?? null,
},
}
},
outputs: {
season: {
type: 'object',
description: 'The requested season object',
properties: SPORTMONKS_SEASON_PROPERTIES,
},
},
}
@@ -0,0 +1,104 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_SEASON_PROPERTIES,
type SportmonksSeason,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetSeasonsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetSeasonsResponse extends ToolResponse {
output: {
seasons: SportmonksSeason[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetSeasonsTool: ToolConfig<
SportmonksGetSeasonsParams,
SportmonksGetSeasonsResponse
> = {
id: 'sportmonks_football_get_seasons',
name: 'Get Seasons',
description: 'Retrieve all football seasons available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. league;stages)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. seasonLeagues:501)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/seasons`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_seasons')
}
return {
success: true,
output: {
seasons: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
seasons: {
type: 'array',
description: 'Array of season objects',
items: { type: 'object', properties: SPORTMONKS_SEASON_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,89 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_SEASON_PROPERTIES,
type SportmonksSeason,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetSeasonsByTeamParams extends SportmonksBaseParams {
teamId: string
}
export interface SportmonksGetSeasonsByTeamResponse extends ToolResponse {
output: {
seasons: SportmonksSeason[]
}
}
export const sportmonksGetSeasonsByTeamTool: ToolConfig<
SportmonksGetSeasonsByTeamParams,
SportmonksGetSeasonsByTeamResponse
> = {
id: 'sportmonks_football_get_seasons_by_team',
name: 'Get Seasons by Team',
description: 'Retrieve all seasons for a team ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. league;stages)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/seasons/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_seasons_by_team')
}
return {
success: true,
output: {
seasons: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
seasons: {
type: 'array',
description: 'Array of season objects for the team',
items: { type: 'object', properties: SPORTMONKS_SEASON_PROPERTIES },
},
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STAGE_PROPERTIES,
type SportmonksStage,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetStageParams extends SportmonksBaseParams {
stageId: string
}
export interface SportmonksGetStageResponse extends ToolResponse {
output: {
stage: SportmonksStage | null
}
}
export const sportmonksGetStageTool: ToolConfig<
SportmonksGetStageParams,
SportmonksGetStageResponse
> = {
id: 'sportmonks_football_get_stage',
name: 'Get Stage by ID',
description: 'Retrieve a single football stage by its ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
stageId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the stage',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. league;season;rounds)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/stages/${encodeURIComponent(params.stageId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_stage')
}
return {
success: true,
output: {
stage: data.data ?? null,
},
}
},
outputs: {
stage: {
type: 'object',
description: 'The requested stage object',
properties: SPORTMONKS_STAGE_PROPERTIES,
},
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STATISTIC_PROPERTIES,
type SportmonksStatistic,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetStageStatisticsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
stageId: string
}
export interface SportmonksGetStageStatisticsResponse extends ToolResponse {
output: {
statistics: SportmonksStatistic[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetStageStatisticsTool: ToolConfig<
SportmonksGetStageStatisticsParams,
SportmonksGetStageStatisticsResponse
> = {
id: 'sportmonks_football_get_stage_statistics',
name: 'Get Stage Statistics',
description: 'Retrieve all available statistics for a stage ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
stageId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the stage',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. participant)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. seasonstatisticTypes:52,88)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/statistics/stages/${encodeURIComponent(params.stageId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_stage_statistics')
}
return {
success: true,
output: {
statistics: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
statistics: {
type: 'array',
description: 'Array of statistic entries for the stage',
items: { type: 'object', properties: SPORTMONKS_STATISTIC_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,105 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STAGE_PROPERTIES,
type SportmonksStage,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetStagesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetStagesResponse extends ToolResponse {
output: {
stages: SportmonksStage[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetStagesTool: ToolConfig<
SportmonksGetStagesParams,
SportmonksGetStagesResponse
> = {
id: 'sportmonks_football_get_stages',
name: 'Get Stages',
description: 'Retrieve all football stages available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. league;season;rounds)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. stageSeasons:19735)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/stages`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_stages')
}
return {
success: true,
output: {
stages: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
stages: {
type: 'array',
description: 'Array of stage objects',
items: { type: 'object', properties: SPORTMONKS_STAGE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,89 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STAGE_PROPERTIES,
type SportmonksStage,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetStagesBySeasonParams extends SportmonksBaseParams {
seasonId: string
}
export interface SportmonksGetStagesBySeasonResponse extends ToolResponse {
output: {
stages: SportmonksStage[]
}
}
export const sportmonksGetStagesBySeasonTool: ToolConfig<
SportmonksGetStagesBySeasonParams,
SportmonksGetStagesBySeasonResponse
> = {
id: 'sportmonks_football_get_stages_by_season',
name: 'Get Stages by Season',
description: 'Retrieve all stages for a season ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. league;rounds)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/stages/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_stages_by_season')
}
return {
success: true,
output: {
stages: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
stages: {
type: 'array',
description: 'Array of stage objects for the season',
items: { type: 'object', properties: SPORTMONKS_STAGE_PROPERTIES },
},
},
}
@@ -0,0 +1,89 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STANDING_CORRECTION_PROPERTIES,
type SportmonksStandingCorrection,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetStandingCorrectionsBySeasonParams extends SportmonksBaseParams {
seasonId: string
}
export interface SportmonksGetStandingCorrectionsBySeasonResponse extends ToolResponse {
output: {
corrections: SportmonksStandingCorrection[]
}
}
export const sportmonksGetStandingCorrectionsBySeasonTool: ToolConfig<
SportmonksGetStandingCorrectionsBySeasonParams,
SportmonksGetStandingCorrectionsBySeasonResponse
> = {
id: 'sportmonks_football_get_standing_corrections_by_season',
name: 'Get Standing Corrections by Season',
description: 'Retrieve point corrections (awarded or deducted) for a season ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. participant;stage)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/standings/corrections/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_standing_corrections_by_season')
}
return {
success: true,
output: {
corrections: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
corrections: {
type: 'array',
description: 'Array of standing correction entries for the season',
items: { type: 'object', properties: SPORTMONKS_STANDING_CORRECTION_PROPERTIES },
},
},
}
@@ -0,0 +1,105 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STANDING_PROPERTIES,
type SportmonksStanding,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetStandingsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetStandingsResponse extends ToolResponse {
output: {
standings: SportmonksStanding[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetStandingsTool: ToolConfig<
SportmonksGetStandingsParams,
SportmonksGetStandingsResponse
> = {
id: 'sportmonks_football_get_standings',
name: 'Get All Standings',
description: 'Retrieve all standings available within your Sportmonks subscription',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participant;league;season)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/standings`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_standings')
}
return {
success: true,
output: {
standings: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
standings: {
type: 'array',
description: 'Array of standing entries',
items: { type: 'object', properties: SPORTMONKS_STANDING_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STANDING_PROPERTIES,
type SportmonksStanding,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetStandingsByRoundParams extends SportmonksBaseParams {
roundId: string
}
export interface SportmonksGetStandingsByRoundResponse extends ToolResponse {
output: {
standings: SportmonksStanding[]
}
}
export const sportmonksGetStandingsByRoundTool: ToolConfig<
SportmonksGetStandingsByRoundParams,
SportmonksGetStandingsByRoundResponse
> = {
id: 'sportmonks_football_get_standings_by_round',
name: 'Get Standings by Round',
description: 'Retrieve the full standing table for a round ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
roundId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the round',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participant;details)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. standingGroups:246697)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/standings/rounds/${encodeURIComponent(params.roundId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_standings_by_round')
}
return {
success: true,
output: {
standings: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
standings: {
type: 'array',
description: 'Array of standing entries for the round',
items: { type: 'object', properties: SPORTMONKS_STANDING_PROPERTIES },
},
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STANDING_PROPERTIES,
type SportmonksStanding,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetStandingsBySeasonParams extends SportmonksBaseParams {
seasonId: string
}
export interface SportmonksGetStandingsBySeasonResponse extends ToolResponse {
output: {
standings: SportmonksStanding[]
}
}
export const sportmonksGetStandingsBySeasonTool: ToolConfig<
SportmonksGetStandingsBySeasonParams,
SportmonksGetStandingsBySeasonResponse
> = {
id: 'sportmonks_football_get_standings_by_season',
name: 'Get Standings by Season',
description: 'Retrieve the full league standings table for a season by season ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. participant;details;form)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. standingStages:77453568)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/standings/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_standings_by_season')
}
return {
success: true,
output: {
standings: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
standings: {
type: 'array',
description: 'Array of standing entries for the season',
items: { type: 'object', properties: SPORTMONKS_STANDING_PROPERTIES },
},
},
}
@@ -0,0 +1,77 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STATE_PROPERTIES,
type SportmonksState,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetStateParams extends SportmonksBaseParams {
stateId: string
}
export interface SportmonksGetStateResponse extends ToolResponse {
output: {
state: SportmonksState | null
}
}
export const sportmonksGetStateTool: ToolConfig<
SportmonksGetStateParams,
SportmonksGetStateResponse
> = {
id: 'sportmonks_football_get_state',
name: 'Get State by ID',
description: 'Retrieve a single fixture state by its ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
stateId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the state',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/states/${encodeURIComponent(params.stateId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_state')
}
return {
success: true,
output: {
state: data.data ?? null,
},
}
},
outputs: {
state: {
type: 'object',
description: 'The requested fixture state object',
properties: SPORTMONKS_STATE_PROPERTIES,
},
},
}
@@ -0,0 +1,93 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_STATE_PROPERTIES,
type SportmonksState,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetStatesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetStatesResponse extends ToolResponse {
output: {
states: SportmonksState[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetStatesTool: ToolConfig<
SportmonksGetStatesParams,
SportmonksGetStatesResponse
> = {
id: 'sportmonks_football_get_states',
name: 'Get States',
description:
'Retrieve all fixture states (e.g. Not Started, 1st Half, Full Time) from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/states`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_states')
}
return {
success: true,
output: {
states: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
states: {
type: 'array',
description: 'Array of fixture state objects',
items: { type: 'object', properties: SPORTMONKS_STATE_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,88 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TEAM_PROPERTIES,
type SportmonksTeam,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTeamParams extends SportmonksBaseParams {
teamId: string
}
export interface SportmonksGetTeamResponse extends ToolResponse {
output: {
team: SportmonksTeam | null
}
}
export const sportmonksGetTeamTool: ToolConfig<SportmonksGetTeamParams, SportmonksGetTeamResponse> =
{
id: 'sportmonks_football_get_team',
name: 'Get Team by ID',
description: 'Retrieve a single football team by its ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. country;venue;coaches;players.player)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_team')
}
return {
success: true,
output: {
team: data.data ?? null,
},
}
},
outputs: {
team: {
type: 'object',
description: 'The requested team object',
properties: SPORTMONKS_TEAM_PROPERTIES,
},
},
}
@@ -0,0 +1,98 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TEAM_RANKING_PROPERTIES,
type SportmonksTeamRanking,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTeamRankingsParams
extends SportmonksBaseParams,
SportmonksPaginationParams {}
export interface SportmonksGetTeamRankingsResponse extends ToolResponse {
output: {
teamRankings: SportmonksTeamRanking[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTeamRankingsTool: ToolConfig<
SportmonksGetTeamRankingsParams,
SportmonksGetTeamRankingsResponse
> = {
id: 'sportmonks_football_get_team_rankings',
name: 'Get All Team Rankings',
description: 'Retrieve all team rankings available within your Sportmonks subscription (beta)',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. team)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/team-rankings`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_team_rankings')
}
return {
success: true,
output: {
teamRankings: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
teamRankings: {
type: 'array',
description: 'Array of team ranking objects',
items: { type: 'object', properties: SPORTMONKS_TEAM_RANKING_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,109 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TEAM_RANKING_PROPERTIES,
type SportmonksTeamRanking,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTeamRankingsByDateParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
date: string
}
export interface SportmonksGetTeamRankingsByDateResponse extends ToolResponse {
output: {
teamRankings: SportmonksTeamRanking[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTeamRankingsByDateTool: ToolConfig<
SportmonksGetTeamRankingsByDateParams,
SportmonksGetTeamRankingsByDateResponse
> = {
id: 'sportmonks_football_get_team_rankings_by_date',
name: 'Get Team Rankings by Date',
description: 'Retrieve team rankings for a given date (YYYY-MM-DD) from Sportmonks (beta)',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
date: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The ranking date in YYYY-MM-DD format',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. team)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/team-rankings/date/${encodeURIComponent(params.date.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_team_rankings_by_date')
}
return {
success: true,
output: {
teamRankings: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
teamRankings: {
type: 'array',
description: 'Array of team ranking objects for the date',
items: { type: 'object', properties: SPORTMONKS_TEAM_RANKING_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,109 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TEAM_RANKING_PROPERTIES,
type SportmonksTeamRanking,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTeamRankingsByTeamParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
teamId: string
}
export interface SportmonksGetTeamRankingsByTeamResponse extends ToolResponse {
output: {
teamRankings: SportmonksTeamRanking[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTeamRankingsByTeamTool: ToolConfig<
SportmonksGetTeamRankingsByTeamParams,
SportmonksGetTeamRankingsByTeamResponse
> = {
id: 'sportmonks_football_get_team_rankings_by_team',
name: 'Get Team Rankings by Team',
description: 'Retrieve team rankings for a team ID from Sportmonks (beta)',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. team)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/team-rankings/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_team_rankings_by_team')
}
return {
success: true,
output: {
teamRankings: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
teamRankings: {
type: 'array',
description: 'Array of team ranking objects for the team',
items: { type: 'object', properties: SPORTMONKS_TEAM_RANKING_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,89 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_SQUAD_PROPERTIES,
type SportmonksSquadEntry,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTeamSquadParams extends SportmonksBaseParams {
teamId: string
}
export interface SportmonksGetTeamSquadResponse extends ToolResponse {
output: {
squad: SportmonksSquadEntry[]
}
}
export const sportmonksGetTeamSquadTool: ToolConfig<
SportmonksGetTeamSquadParams,
SportmonksGetTeamSquadResponse
> = {
id: 'sportmonks_football_get_team_squad',
name: 'Get Team Squad',
description: 'Retrieve the current domestic squad for a team by team ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. player;position)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/squads/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_team_squad')
}
return {
success: true,
output: {
squad: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
squad: {
type: 'array',
description: 'Array of squad entries for the team',
items: { type: 'object', properties: SPORTMONKS_SQUAD_PROPERTIES },
},
},
}
@@ -0,0 +1,98 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_SQUAD_PROPERTIES,
type SportmonksSquadEntry,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTeamSquadBySeasonParams extends SportmonksBaseParams {
seasonId: string
teamId: string
}
export interface SportmonksGetTeamSquadBySeasonResponse extends ToolResponse {
output: {
squad: SportmonksSquadEntry[]
}
}
export const sportmonksGetTeamSquadBySeasonTool: ToolConfig<
SportmonksGetTeamSquadBySeasonParams,
SportmonksGetTeamSquadBySeasonResponse
> = {
id: 'sportmonks_football_get_team_squad_by_season',
name: 'Get Team Squad by Season',
description: 'Retrieve the (historical) squad for a team in a specific season from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. player;position)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/squads/seasons/${encodeURIComponent(
params.seasonId.trim()
)}/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_team_squad_by_season')
}
return {
success: true,
output: {
squad: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
squad: {
type: 'array',
description: 'Array of squad entries for the team in the season',
items: { type: 'object', properties: SPORTMONKS_SQUAD_PROPERTIES },
},
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TEAM_PROPERTIES,
type SportmonksTeam,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTeamsByCountryParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
countryId: string
}
export interface SportmonksGetTeamsByCountryResponse extends ToolResponse {
output: {
teams: SportmonksTeam[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTeamsByCountryTool: ToolConfig<
SportmonksGetTeamsByCountryParams,
SportmonksGetTeamsByCountryResponse
> = {
id: 'sportmonks_football_get_teams_by_country',
name: 'Get Teams by Country',
description: 'Retrieve all teams for a country ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
countryId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the country',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. country;venue)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order teams by id (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/teams/countries/${encodeURIComponent(params.countryId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_teams_by_country')
}
return {
success: true,
output: {
teams: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
teams: {
type: 'array',
description: 'Array of team objects for the country',
items: { type: 'object', properties: SPORTMONKS_TEAM_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,115 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TEAM_PROPERTIES,
type SportmonksTeam,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTeamsBySeasonParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
seasonId: string
}
export interface SportmonksGetTeamsBySeasonResponse extends ToolResponse {
output: {
teams: SportmonksTeam[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTeamsBySeasonTool: ToolConfig<
SportmonksGetTeamsBySeasonParams,
SportmonksGetTeamsBySeasonResponse
> = {
id: 'sportmonks_football_get_teams_by_season',
name: 'Get Teams by Season',
description: 'Retrieve all teams for a season ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Semicolon-separated relations to enrich the response (e.g. country;venue)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order teams by id (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/teams/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_teams_by_season')
}
return {
success: true,
output: {
teams: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
teams: {
type: 'array',
description: 'Array of team objects for the season',
items: { type: 'object', properties: SPORTMONKS_TEAM_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,117 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TOPSCORER_PROPERTIES,
type SportmonksTopscorer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTopscorersBySeasonParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
seasonId: string
}
export interface SportmonksGetTopscorersBySeasonResponse extends ToolResponse {
output: {
topscorers: SportmonksTopscorer[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTopscorersBySeasonTool: ToolConfig<
SportmonksGetTopscorersBySeasonParams,
SportmonksGetTopscorersBySeasonResponse
> = {
id: 'sportmonks_football_get_topscorers_by_season',
name: 'Get Topscorers by Season',
description:
'Retrieve the topscorers (goals, assists, cards) for a season by season ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
seasonId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the season',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;participant;type)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. seasontopscorerTypes:208)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order topscorers by position (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/topscorers/seasons/${encodeURIComponent(params.seasonId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_topscorers_by_season')
}
return {
success: true,
output: {
topscorers: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
topscorers: {
type: 'array',
description: 'Array of topscorer entries for the season',
items: { type: 'object', properties: SPORTMONKS_TOPSCORER_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TOPSCORER_PROPERTIES,
type SportmonksTopscorer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTopscorersByStageParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
stageId: string
}
export interface SportmonksGetTopscorersByStageResponse extends ToolResponse {
output: {
topscorers: SportmonksTopscorer[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTopscorersByStageTool: ToolConfig<
SportmonksGetTopscorersByStageParams,
SportmonksGetTopscorersByStageResponse
> = {
id: 'sportmonks_football_get_topscorers_by_stage',
name: 'Get Topscorers by Stage',
description: 'Retrieve topscorers for a stage by stage ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
stageId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the stage',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;participant;type)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. stageTopscorerTypes:208)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/topscorers/stages/${encodeURIComponent(params.stageId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_topscorers_by_stage')
}
return {
success: true,
output: {
topscorers: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
topscorers: {
type: 'array',
description: 'Array of topscorer entries for the stage',
items: { type: 'object', properties: SPORTMONKS_TOPSCORER_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,96 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TOTW_PROPERTIES,
type SportmonksTotw,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTotwParams extends SportmonksBaseParams, SportmonksPaginationParams {}
export interface SportmonksGetTotwResponse extends ToolResponse {
output: {
totw: SportmonksTotw[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTotwTool: ToolConfig<SportmonksGetTotwParams, SportmonksGetTotwResponse> =
{
id: 'sportmonks_football_get_totw',
name: 'Get All Team of the Week',
description: 'Retrieve all available Team of the Week (TOTW) entries from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. fixture;team;player;round)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) =>
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_BASE_URL}/team-of-the-week`, params),
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_totw')
}
return {
success: true,
output: {
totw: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
totw: {
type: 'array',
description: 'Array of Team of the Week entries',
items: { type: 'object', properties: SPORTMONKS_TOTW_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,84 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TOTW_PROPERTIES,
type SportmonksTotw,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTotwByRoundParams extends SportmonksBaseParams {
roundId: string
}
export interface SportmonksGetTotwByRoundResponse extends ToolResponse {
output: {
totw: SportmonksTotw[]
}
}
export const sportmonksGetTotwByRoundTool: ToolConfig<
SportmonksGetTotwByRoundParams,
SportmonksGetTotwByRoundResponse
> = {
id: 'sportmonks_football_get_totw_by_round',
name: 'Get Team of the Week by Round',
description: 'Retrieve the Team of the Week (TOTW) for a round ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
roundId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the round',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. fixture;team;player;round)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/team-of-the-week/rounds/${encodeURIComponent(params.roundId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_totw_by_round')
}
return {
success: true,
output: {
totw: Array.isArray(data.data) ? data.data : [],
},
}
},
outputs: {
totw: {
type: 'array',
description: 'Array of Team of the Week entries for the round',
items: { type: 'object', properties: SPORTMONKS_TOTW_PROPERTIES },
},
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TRANSFER_PROPERTIES,
type SportmonksTransfer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTransferParams extends SportmonksBaseParams {
transferId: string
}
export interface SportmonksGetTransferResponse extends ToolResponse {
output: {
transfer: SportmonksTransfer | null
}
}
export const sportmonksGetTransferTool: ToolConfig<
SportmonksGetTransferParams,
SportmonksGetTransferResponse
> = {
id: 'sportmonks_football_get_transfer',
name: 'Get Transfer by ID',
description: 'Retrieve a single transfer by its ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
transferId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the transfer',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;fromTeam;toTeam)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/transfers/${encodeURIComponent(params.transferId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_transfer')
}
return {
success: true,
output: {
transfer: data.data ?? null,
},
}
},
outputs: {
transfer: {
type: 'object',
description: 'The requested transfer object',
properties: SPORTMONKS_TRANSFER_PROPERTIES,
},
},
}
@@ -0,0 +1,90 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
type SportmonksBaseParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TRANSFER_RUMOUR_PROPERTIES,
type SportmonksTransferRumour,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTransferRumourParams extends SportmonksBaseParams {
rumourId: string
}
export interface SportmonksGetTransferRumourResponse extends ToolResponse {
output: {
transferRumour: SportmonksTransferRumour | null
}
}
export const sportmonksGetTransferRumourTool: ToolConfig<
SportmonksGetTransferRumourParams,
SportmonksGetTransferRumourResponse
> = {
id: 'sportmonks_football_get_transfer_rumour',
name: 'Get Transfer Rumour by ID',
description: 'Retrieve a single transfer rumour by its ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
rumourId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the transfer rumour',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;fromTeam;toTeam)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/transfer-rumours/${encodeURIComponent(params.rumourId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_transfer_rumour')
}
return {
success: true,
output: {
transferRumour: data.data ?? null,
},
}
},
outputs: {
transferRumour: {
type: 'object',
description: 'The requested transfer rumour object',
properties: SPORTMONKS_TRANSFER_RUMOUR_PROPERTIES,
},
},
}
@@ -0,0 +1,125 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TRANSFER_RUMOUR_PROPERTIES,
type SportmonksTransferRumour,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTransferRumoursBetweenDatesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
startDate: string
endDate: string
}
export interface SportmonksGetTransferRumoursBetweenDatesResponse extends ToolResponse {
output: {
transferRumours: SportmonksTransferRumour[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTransferRumoursBetweenDatesTool: ToolConfig<
SportmonksGetTransferRumoursBetweenDatesParams,
SportmonksGetTransferRumoursBetweenDatesResponse
> = {
id: 'sportmonks_football_get_transfer_rumours_between_dates',
name: 'Get Transfer Rumours Between Dates',
description: 'Retrieve transfer rumours within a date range (YYYY-MM-DD) from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
startDate: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Start date in YYYY-MM-DD format',
},
endDate: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'End date in YYYY-MM-DD format',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;fromTeam;toTeam)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/transfer-rumours/between/${encodeURIComponent(
params.startDate.trim()
)}/${encodeURIComponent(params.endDate.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_transfer_rumours_between_dates')
}
return {
success: true,
output: {
transferRumours: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
transferRumours: {
type: 'array',
description: 'Array of transfer rumour objects within the date range',
items: { type: 'object', properties: SPORTMONKS_TRANSFER_RUMOUR_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TRANSFER_RUMOUR_PROPERTIES,
type SportmonksTransferRumour,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTransferRumoursByPlayerParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
playerId: string
}
export interface SportmonksGetTransferRumoursByPlayerResponse extends ToolResponse {
output: {
transferRumours: SportmonksTransferRumour[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTransferRumoursByPlayerTool: ToolConfig<
SportmonksGetTransferRumoursByPlayerParams,
SportmonksGetTransferRumoursByPlayerResponse
> = {
id: 'sportmonks_football_get_transfer_rumours_by_player',
name: 'Get Transfer Rumours by Player',
description: 'Retrieve transfer rumours for a player ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
playerId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the player',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;fromTeam;toTeam)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/transfer-rumours/players/${encodeURIComponent(params.playerId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_transfer_rumours_by_player')
}
return {
success: true,
output: {
transferRumours: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
transferRumours: {
type: 'array',
description: 'Array of transfer rumour objects for the player',
items: { type: 'object', properties: SPORTMONKS_TRANSFER_RUMOUR_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,116 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TRANSFER_RUMOUR_PROPERTIES,
type SportmonksTransferRumour,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTransferRumoursByTeamParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
teamId: string
}
export interface SportmonksGetTransferRumoursByTeamResponse extends ToolResponse {
output: {
transferRumours: SportmonksTransferRumour[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTransferRumoursByTeamTool: ToolConfig<
SportmonksGetTransferRumoursByTeamParams,
SportmonksGetTransferRumoursByTeamResponse
> = {
id: 'sportmonks_football_get_transfer_rumours_by_team',
name: 'Get Transfer Rumours by Team',
description: 'Retrieve transfer rumours for a team ID from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
teamId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The unique id of the team',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;fromTeam;toTeam)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/transfer-rumours/teams/${encodeURIComponent(params.teamId.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_transfer_rumours_by_team')
}
return {
success: true,
output: {
transferRumours: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
transferRumours: {
type: 'array',
description: 'Array of transfer rumour objects for the team',
items: { type: 'object', properties: SPORTMONKS_TRANSFER_RUMOUR_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}
@@ -0,0 +1,125 @@
import {
appendSportmonksQuery,
buildSportmonksHeaders,
handleSportmonksError,
SPORTMONKS_PAGINATION_OUTPUT,
type SportmonksBaseParams,
type SportmonksPagination,
type SportmonksPaginationParams,
} from '@/tools/sportmonks/types'
import {
SPORTMONKS_FOOTBALL_BASE_URL,
SPORTMONKS_TRANSFER_PROPERTIES,
type SportmonksTransfer,
} from '@/tools/sportmonks_football/types'
import type { ToolConfig, ToolResponse } from '@/tools/types'
export interface SportmonksGetTransfersBetweenDatesParams
extends SportmonksBaseParams,
SportmonksPaginationParams {
startDate: string
endDate: string
}
export interface SportmonksGetTransfersBetweenDatesResponse extends ToolResponse {
output: {
transfers: SportmonksTransfer[]
pagination?: SportmonksPagination | null
}
}
export const sportmonksGetTransfersBetweenDatesTool: ToolConfig<
SportmonksGetTransfersBetweenDatesParams,
SportmonksGetTransfersBetweenDatesResponse
> = {
id: 'sportmonks_football_get_transfers_between_dates',
name: 'Get Transfers Between Dates',
description: 'Retrieve transfers within a date range (YYYY-MM-DD) from Sportmonks',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Sportmonks API token',
},
startDate: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Start date in YYYY-MM-DD format',
},
endDate: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'End date in YYYY-MM-DD format',
},
include: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description:
'Semicolon-separated relations to enrich the response (e.g. player;fromTeam;toTeam)',
},
filters: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Filters to apply (e.g. transferTypes:219,220)',
},
per_page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Number of results per page (max 50, default 25)',
},
page: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Page number to retrieve',
},
order: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Order direction (asc or desc)',
},
},
request: {
url: (params) => {
const url = `${SPORTMONKS_FOOTBALL_BASE_URL}/transfers/between/${encodeURIComponent(
params.startDate.trim()
)}/${encodeURIComponent(params.endDate.trim())}`
return appendSportmonksQuery(url, params)
},
method: 'GET',
headers: (params) => buildSportmonksHeaders(params.apiKey),
},
transformResponse: async (response: Response) => {
const data = await response.json()
if (!response.ok) {
handleSportmonksError(data, response.status, 'get_transfers_between_dates')
}
return {
success: true,
output: {
transfers: Array.isArray(data.data) ? data.data : [],
pagination: data.pagination ?? null,
},
}
},
outputs: {
transfers: {
type: 'array',
description: 'Array of transfer objects within the date range',
items: { type: 'object', properties: SPORTMONKS_TRANSFER_PROPERTIES },
},
pagination: SPORTMONKS_PAGINATION_OUTPUT,
},
}

Some files were not shown because too many files have changed in this diff Show More