add_blocked_url
Block specific URLs or directories from being crawled by Bing Webmaster Tools to control search engine indexing and manage site visibility.
Instructions
Block a URL or directory from being crawled.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes | ||
| url | Yes | ||
| block_type | No | Directory |
Implementation Reference
- mcp_server_bwt/main.py:520-546 (handler)The handler function for the 'add_blocked_url' tool. It calls the Bing Webmaster API's AddBlockedUrl endpoint to block the specified URL or directory from being crawled.@mcp.tool( name="add_blocked_url", description="Block a URL or directory from being crawled." ) async def add_blocked_url( site_url: Annotated[str, "The URL of the site"], url: Annotated[str, "The URL or directory to block"], block_type: Annotated[str, "Type of block (Page or Directory)"] = "Directory", ) -> Dict[str, str]: """ Block a URL or directory from being crawled. Args: site_url: The URL of the site url: The URL or directory to block block_type: Type of block ("Page" or "Directory") Returns: Success message """ async with api: await api._make_request( "AddBlockedUrl", "POST", {"siteUrl": site_url, "blockedUrl": url, "blockType": block_type}, ) return {"message": f"URL {url} blocked successfully"}