Skip to main content
Glama
isiahw1

mcp-server-bing-webmaster

remove_page_preview_block

Remove page preview blocks from Bing Webmaster Tools to manage how your site appears in search results.

Instructions

Remove a page preview block.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_urlYes
block_urlYes

Implementation Reference

  • The handler function decorated with @mcp.tool registers and implements the remove_page_preview_block tool. It sends a POST request to the Bing Webmaster API's RemovePagePreviewBlock endpoint to remove the specified page preview block.
    @mcp.tool(name="remove_page_preview_block", description="Remove a page preview block.")
    async def remove_page_preview_block(
        site_url: Annotated[str, "The URL of the site"],
        block_url: Annotated[str, "URL pattern to unblock"],
    ) -> Dict[str, str]:
        """
        Remove a page preview block.
    
        Args:
            site_url: The URL of the site
            block_url: URL pattern to unblock
    
        Returns:
            Success message
        """
        async with api:
            await api._make_request(
                "RemovePagePreviewBlock",
                "POST",
                {"siteUrl": site_url, "blockUrl": block_url},
            )
            return {"message": f"Page preview block for {block_url} removed successfully"}
  • The @mcp.tool decorator registers the remove_page_preview_block tool with the MCP server, defining its name and description.
    @mcp.tool(name="remove_page_preview_block", description="Remove a page preview block.")
  • Type annotations with descriptions define the input schema for the tool parameters.
        site_url: Annotated[str, "The URL of the site"],
        block_url: Annotated[str, "URL pattern to unblock"],
    ) -> Dict[str, str]:

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