add_deep_link_block
Block specific URL patterns from appearing as deep links in Bing search results to manage site visibility and control indexing.
Instructions
Block deep links for specific URL patterns.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes | ||
| url_pattern | Yes | ||
| block_type | Yes | ||
| reason | Yes |
Implementation Reference
- mcp_server_bwt/main.py:770-773 (registration)Registration of the 'add_deep_link_block' tool using the @mcp.tool decorator with name and description.@mcp.tool( name="add_deep_link_block", description="Block deep links for specific URL patterns.", )
- mcp_server_bwt/main.py:774-803 (handler)Handler function for 'add_deep_link_block' tool. Takes site_url, url_pattern, block_type, and reason parameters. Calls the Bing Webmaster API 'AddDeepLinkBlock' endpoint via POST request and returns a success message.async def add_deep_link_block( site_url: Annotated[str, "The URL of the site"], url_pattern: Annotated[str, "URL pattern to block"], block_type: Annotated[str, "Type of block"], reason: Annotated[str, "Reason for blocking"], ) -> Dict[str, str]: """ Block deep links for specific URL patterns. Args: site_url: The URL of the site url_pattern: URL pattern to block block_type: Type of block reason: Reason for blocking Returns: Success message """ async with api: await api._make_request( "AddDeepLinkBlock", "POST", { "siteUrl": site_url, "urlPattern": url_pattern, "blockType": block_type, "reason": reason, }, ) return {"message": f"Deep link block for {url_pattern} added successfully"}