add_deep_link_block
Block specific URL patterns from appearing as deep links in Bing search results to control site visibility.
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:774-803 (handler)The main handler function for the 'add_deep_link_block' tool. It takes site_url, url_pattern, block_type, and reason as inputs, makes a POST request to the Bing Webmaster API endpoint 'AddDeepLinkBlock', 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"}
- mcp_server_bwt/main.py:770-773 (registration)The @mcp.tool decorator registers the 'add_deep_link_block' tool with the MCP server, specifying its name and description.@mcp.tool( name="add_deep_link_block", description="Block deep links for specific URL patterns.", )