Skip to main content
Glama
DynamicEndpoints

FantasyPros MCP Server

get_sport_news

Retrieve sports news for NFL, MLB, NBA, or NHL with filtering options for injury reports, game recaps, transactions, rumors, and breaking news to support fantasy sports decisions.

Instructions

Get news for a specific sport

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sportYesSport to get news for
limitNoNumber of news items to return (max 25)
categoryNoType of news to show

Implementation Reference

  • The main handler function for 'get_sport_news' tool. It extracts parameters like sport, limit, and category, makes an API call to FantasyPros /${sport}/news endpoint, and returns the JSON response as text content.
    private async getNews(args: any) { const { sport, limit = 25, category } = args; const params: any = { limit }; if (category) params.category = category; const response = await this.axiosInstance.get(`/${sport}/news`, { params }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; }
  • Input schema definition for the 'get_sport_news' tool, specifying parameters like sport (required, enum), limit, and category.
    inputSchema: { type: 'object', properties: { sport: { type: 'string', enum: ['nfl', 'mlb', 'nba', 'nhl'], description: 'Sport to get news for', }, limit: { type: 'number', description: 'Number of news items to return (max 25)', minimum: 1, maximum: 25, }, category: { type: 'string', enum: ['injury', 'recap', 'transaction', 'rumor', 'breaking'], description: 'Type of news to show', }, }, required: ['sport'], },
  • src/index.ts:53-78 (registration)
    Tool registration in the ListToolsRequestSchema handler, including name, description, and input schema.
    { name: 'get_sport_news', description: 'Get news for a specific sport', inputSchema: { type: 'object', properties: { sport: { type: 'string', enum: ['nfl', 'mlb', 'nba', 'nhl'], description: 'Sport to get news for', }, limit: { type: 'number', description: 'Number of news items to return (max 25)', minimum: 1, maximum: 25, }, category: { type: 'string', enum: ['injury', 'recap', 'transaction', 'rumor', 'breaking'], description: 'Type of news to show', }, }, required: ['sport'], }, },
  • src/index.ts:175-176 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes to the getNews handler function.
    case 'get_sport_news': return await this.getNews(request.params.arguments);

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