Skip to main content
Glama

odds.prematch

Retrieve pre-match odds for football fixtures including 1X2, Over/Under 2.5, and BTTS from multiple bookmakers using match IDs.

Instructions

Quote pre-match (1X2, Over/Under 2.5, BTTS) normalizzate con lista bookmaker.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
match_idYesFixture id di API-Football

Implementation Reference

  • The main handler function for the 'odds.prematch' tool. It fetches the fixture using apiFootball and retrieves normalized pre-match odds (1X2, Over/Under 2.5, BTTS) from oddsApi for the given match_id.
    execute: async (args) => { const fixture = await apiFootball.getFixture(args.match_id); if (!fixture) { throw new Error(`Fixture ${args.match_id} non trovata`); } const odds = await oddsApi.getMarketOddsForFixture(fixture); return JSON.stringify( { match: fixture, markets: odds, }, null, 2, ); },
  • Zod schema defining the input parameters for the tool: a required numeric match_id (fixture ID from API-Football).
    parameters: z.object({ match_id: z.number().describe("Fixture id di API-Football"), }),
  • src/tools/odds.ts:6-27 (registration)
    Registration of the 'odds.prematch' tool within the registerOddsTool function using server.addTool.
    server.addTool({ name: "odds.prematch", description: "Quote pre-match (1X2, Over/Under 2.5, BTTS) normalizzate con lista bookmaker.", parameters: z.object({ match_id: z.number().describe("Fixture id di API-Football"), }), execute: async (args) => { const fixture = await apiFootball.getFixture(args.match_id); if (!fixture) { throw new Error(`Fixture ${args.match_id} non trovata`); } const odds = await oddsApi.getMarketOddsForFixture(fixture); return JSON.stringify( { match: fixture, markets: odds, }, null, 2, ); }, });
  • src/index.ts:18-18 (registration)
    Invocation of registerOddsTool to add the odds.prematch tool to the main MCP server.
    registerOddsTool(server);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Valerio357/bet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server