add_page_preview_block
Prevent rich snippets from appearing in search results by adding a page preview block through Bing Webmaster Tools.
Instructions
Add a page preview block to prevent rich snippets.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes | ||
| block_url | Yes | ||
| block_type | No | Page |
Implementation Reference
- mcp_server_bwt/main.py:1125-1152 (handler)The @mcp.tool decorator registers the tool, and the async function implements the handler logic by making a POST request to Bing Webmaster API's AddPagePreviewBlock endpoint to block page previews for the specified URL or pattern.@mcp.tool( name="add_page_preview_block", description="Add a page preview block to prevent rich snippets.", ) async def add_page_preview_block( site_url: Annotated[str, "The URL of the site"], block_url: Annotated[str, "URL or pattern to block"], block_type: Annotated[str, "Type of block"] = "Page", ) -> Dict[str, str]: """ Add a page preview block to prevent rich snippets. Args: site_url: The URL of the site block_url: URL or pattern to block block_type: Type of block (default: Page) Returns: Success message """ async with api: await api._make_request( "AddPagePreviewBlock", "POST", {"siteUrl": site_url, "blockUrl": block_url, "blockType": block_type}, ) return {"message": f"Page preview block for {block_url} added successfully"}
- mcp_server_bwt/main.py:1125-1128 (registration)Registration of the add_page_preview_block tool using the @mcp.tool decorator with name and description.@mcp.tool( name="add_page_preview_block", description="Add a page preview block to prevent rich snippets.", )