Skip to main content
Glama
isiahw1

mcp-server-bing-webmaster

get_query_page_stats

Retrieve detailed traffic statistics for specific search queries to analyze performance and optimize website visibility in Bing search results.

Instructions

Get detailed traffic statistics for a specific query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_urlYes
queryYes

Implementation Reference

  • Registration of the 'get_query_page_stats' tool using the @mcp.tool decorator.
        name="get_query_page_stats",
        description="Get detailed traffic statistics for a specific query.",
    )
    async def get_query_page_stats(
  • The main handler function for the tool, which calls the Bing Webmaster API endpoint GetQueryPageStats and ensures type compatibility for MCP.
        site_url: Annotated[str, "The URL of the site"],
        query: Annotated[str, "The search query to analyze"],
    ) -> List[Dict[str, Any]]:
        """
        Get detailed traffic statistics for a specific query.
    
        Args:
            site_url: The URL of the site
            query: The search query to analyze
    
        Returns:
            List of page statistics for the given query
        """
        async with api:
            stats = await api._make_request(
                f"GetQueryPageStats?siteUrl={site_url}&query={query}"
            )
            return api._ensure_type_field(stats, "QueryPageStats")

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