Skip to main content
Glama
isiahw1

mcp-server-bing-webmaster

get_query_traffic_stats

Analyze query traffic statistics over time for a website using Bing Webmaster Tools data to monitor search performance trends.

Instructions

Get traffic statistics for queries over time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_urlYes
queryYes
periodNo30d

Implementation Reference

  • Registration of the 'get_query_traffic_stats' tool using the @mcp.tool decorator, specifying name and description.
    @mcp.tool( name="get_query_traffic_stats", description="Get traffic statistics for queries over time.", )
  • The main handler function for the tool. It accepts site_url, query, and optional period parameters, makes an authenticated API request to Bing Webmaster Tools for query traffic stats, and returns the typed response.
    async def get_query_traffic_stats( site_url: Annotated[str, "The URL of the site"], query: Annotated[str, "The search query"], period: Annotated[str, "Time period (e.g., '7d', '30d')"] = "30d", ) -> Dict[str, Any]: """ Get traffic statistics for queries over time. Args: site_url: The URL of the site query: The search query period: Time period (default: 30d) Returns: Traffic statistics for the query """ async with api: stats = await api._make_request( f"GetQueryTrafficStats?siteUrl={site_url}&query={query}&period={period}" ) return api._ensure_type_field(stats, "QueryTrafficStats")
  • Input schema defined by Annotated type hints in the function signature, describing parameters for site URL, search query, and time period.
    site_url: Annotated[str, "The URL of the site"], query: Annotated[str, "The search query"], period: Annotated[str, "Time period (e.g., '7d', '30d')"] = "30d", ) -> Dict[str, Any]:

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/isiahw1/mcp-server-bing-webmaster'

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