Skip to main content
Glama
DynamicEndpoints

FantasyPros MCP Server

get_rankings

Retrieve consensus player rankings for NFL or NBA fantasy sports, filterable by position and scoring type to inform draft and lineup decisions.

Instructions

Get consensus rankings for a sport

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sportYesSport to get rankings for
positionNoPosition to filter by
scoringNoScoring type (for NFL)

Implementation Reference

  • The handler function that implements the core logic of the 'get_rankings' tool by querying the FantasyPros API for consensus rankings.
    private async getRankings(args: any) {
      const { sport, position = 'ALL', scoring = 'STD' } = args;
      const season = new Date().getFullYear().toString();
      const params: any = {
        position,
        scoring,
      };
    
      const response = await this.axiosInstance.get(
        `/${sport}/${season}/consensus-rankings`,
        { params }
      );
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • src/index.ts:98-121 (registration)
    Registration of the 'get_rankings' tool in the listTools handler, including its metadata and input schema.
    {
      name: 'get_rankings',
      description: 'Get consensus rankings for a sport',
      inputSchema: {
        type: 'object',
        properties: {
          sport: {
            type: 'string',
            enum: ['nfl', 'nba'],
            description: 'Sport to get rankings for',
          },
          position: {
            type: 'string',
            description: 'Position to filter by',
          },
          scoring: {
            type: 'string',
            enum: ['STD', 'PPR', 'HALF'],
            description: 'Scoring type (for NFL)',
          },
        },
        required: ['sport'],
      },
    },
  • src/index.ts:179-180 (registration)
    The switch case in the CallToolRequest handler that dispatches calls to the 'get_rankings' tool to its handler method.
    case 'get_rankings':
      return await this.getRankings(request.params.arguments);
  • The input schema defining parameters for the 'get_rankings' tool.
    inputSchema: {
      type: 'object',
      properties: {
        sport: {
          type: 'string',
          enum: ['nfl', 'nba'],
          description: 'Sport to get rankings for',
        },
        position: {
          type: 'string',
          description: 'Position to filter by',
        },
        scoring: {
          type: 'string',
          enum: ['STD', 'PPR', 'HALF'],
          description: 'Scoring type (for NFL)',
        },
      },
      required: ['sport'],
    },

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

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/DynamicEndpoints/fantasy-pros-mcp'

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