Skip to main content
Glama

get_rolling_odds

Retrieve Teamfight Tactics champion shop rolling probabilities by player level to calculate optimal reroll strategies and improve in-game decision making.

Instructions

Get TFT champion shop rolling odds by player level. Shows the probability of seeing each cost tier (1-5) at a given level. Omit the level to see the full table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelNoPlayer level (2-10). Omit to get the full table.

Implementation Reference

  • The getRollingOdds function implements the tool logic, returning rolling odds for a specific level or the full table.
    export function getRollingOdds(
      input: GetRollingOddsInputType,
    ): GetRollingOddsResult | GetRollingOddsError {
      if (input.level != null) {
        const odds = ROLLING_ODDS[input.level];
        if (!odds) {
          return { error: `Invalid level ${input.level}. Valid range is 2-10.` };
        }
        return { levels: [{ level: input.level, odds }] };
      }
    
      // Return full table
      const levels: LevelOdds[] = Object.entries(ROLLING_ODDS)
        .map(([lvl, odds]) => ({ level: Number(lvl), odds }))
        .sort((a, b) => a.level - b.level);
    
      return { levels };
    }
  • Zod schema defining the input for get_rolling_odds tool.
    export const GetRollingOddsInput = z.object({
      level: z
        .number()
        .min(2)
        .max(10)
        .optional()
        .describe('Player level (2-10). Omit to get the full table.'),
    });
  • src/server.ts:187-196 (registration)
    Registration and execution of the get_rolling_odds tool within the MCP server.
    // 8. get_rolling_odds
    server.tool(
      'get_rolling_odds',
      'Get TFT champion shop rolling odds by player level. Shows the probability of seeing each cost tier (1-5) at a given level. Omit the level to see the full table.',
      GetRollingOddsInput.shape,
      async (params) => {
        try {
          const result = getRollingOdds(params);
          return {
            content: [{ type: 'text' as const, text: formatGetRollingOdds(result) }],

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/gregario/tft-oracle'

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