Skip to main content
Glama
tarun7r

cricket-mcp-server

search_live_commentary

Fetch real-time cricket match commentary and updates by entering match details or team names, providing instant web search results for live match insights.

Instructions

Search for live commentary and updates for cricket matches on the web.

Args: match_description (str, optional): Full match description (e.g., "Zimbabwe vs New Zealand 2nd Test") team1 (str, optional): First team name team2 (str, optional): Second team name

Returns: list: Web search results for live commentary and match updates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
match_descriptionNo
team1No
team2No

Implementation Reference

  • The handler function for the 'search_live_commentary' tool. It is decorated with @mcp.tool(), which handles both registration and schema definition via type hints. The function constructs a search query and uses the 'web_search' tool to find live commentary from Cricbuzz, ESPN Cricinfo, and general web results.
    @mcp.tool() def search_live_commentary(match_description: str = None, team1: str = None, team2: str = None) -> list: """ Search for live commentary and updates for cricket matches on the web. Args: match_description (str, optional): Full match description (e.g., "Zimbabwe vs New Zealand 2nd Test") team1 (str, optional): First team name team2 (str, optional): Second team name Returns: list: Web search results for live commentary and match updates """ if not match_description and not (team1 and team2): return [{"error": "Please provide either match_description or both team1 and team2"}] # Build search query if match_description: query = f"live commentary {match_description} cricket" else: query = f"live commentary {team1} vs {team2} cricket" # Search with cricket news sites results = [] # Try Cricbuzz cricbuzz_results = web_search(query, num_results=3, site_filter="cricbuzz.com") if cricbuzz_results and "error" not in cricbuzz_results[0]: results.extend(cricbuzz_results) # Try ESPN Cricinfo espn_results = web_search(query, num_results=3, site_filter="espncricinfo.com") if espn_results and "error" not in espn_results[0]: results.extend(espn_results) # General search general_results = web_search(query, num_results=5) if general_results and "error" not in general_results[0]: results.extend(general_results) return results[:10] # Limit to 10 results

Other Tools

Related 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/tarun7r/cricket-mcp-server'

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