Skip to main content
Glama
odds.ts892 B
import { z } from "zod"; import { FastMCP } from "fastmcp"; import { footballData, oddsApi } from "../services/context.js"; export const registerOddsTool = (server: FastMCP) => { 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 Football-Data.org"), }), execute: async (args) => { const fixture = await footballData.getFixture(args.match_id); if (!fixture) { throw new Error(`Fixture ${args.match_id} non trovata su Football-Data.org`); } const odds = await oddsApi.getMarketOddsForFixture(fixture); return JSON.stringify( { match: fixture, markets: odds, }, null, 2, ); }, }); };

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