Skip to main content
Glama
DynamicEndpoints

FantasyPros MCP Server

get_players

Retrieve detailed player information for NFL, MLB, NBA, or NHL sports to support fantasy sports research and decision-making.

Instructions

Get player information for a specific sport

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sportYesSport to get players for
playerIdNoFilter by specific player ID

Implementation Reference

  • The handler function that executes the get_players tool: fetches player data from FantasyPros API for the specified sport and optional playerId, returns JSON response.
    private async getPlayers(args: any) {
      const { sport, playerId } = args;
      const params: any = {};
      if (playerId) params.player = playerId;
    
      const response = await this.axiosInstance.get(`/${sport}/players`, { params });
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • Input schema for the get_players tool, defining sport (required, enum) and optional playerId.
    inputSchema: {
      type: 'object',
      properties: {
        sport: {
          type: 'string',
          enum: ['nfl', 'mlb', 'nba', 'nhl'],
          description: 'Sport to get players for',
        },
        playerId: {
          type: 'string',
          description: 'Filter by specific player ID',
        },
      },
      required: ['sport'],
    },
  • src/index.ts:79-97 (registration)
    Registration of the get_players tool in the tools list returned by ListToolsRequestHandler.
    {
      name: 'get_players',
      description: 'Get player information for a specific sport',
      inputSchema: {
        type: 'object',
        properties: {
          sport: {
            type: 'string',
            enum: ['nfl', 'mlb', 'nba', 'nhl'],
            description: 'Sport to get players for',
          },
          playerId: {
            type: 'string',
            description: 'Filter by specific player ID',
          },
        },
        required: ['sport'],
      },
    },
  • src/index.ts:177-178 (registration)
    Dispatch/registration in the CallToolRequestHandler switch statement, routing to the getPlayers handler.
    case 'get_players':
      return await this.getPlayers(request.params.arguments);

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