remove_blocked_url
Unblock URLs from Bing Webmaster Tools to restore indexing and crawling access for specific pages or directories on your website.
Instructions
Remove a blocked URL from a site.
Args: site_url: The URL of the site blocked_url: The URL to be unblocked entity_type: The type of entity to unblock (Page or Directory) request_type: The type of request (CacheOnly or FullRemoval) date: The date the URL was blocked
Raises: BingWebmasterError: If URL cannot be unblocked
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| self | Yes | ||
| site_url | Yes | ||
| blocked_url | Yes | ||
| entity_type | No | ||
| request_type | No | ||
| date | No |
Implementation Reference
- Core handler logic for executing the remove_blocked_url tool. This wrapper function is dynamically created for each tool and delegates to the underlying ContentBlockingService.remove_blocked_url method.@mcp.tool() @wraps(original_method) async def wrapper(*args: Any, **kwargs: Any) -> Any: # Filter out any 'self' arguments that might be passed by the MCP client kwargs = {k: v for k, v in kwargs.items() if k != "self"} async with service as s: service_obj = getattr(s, service_attr) # Get the method from the instance method = getattr(service_obj, method_name) # Call the method directly - it's already bound to the instance return await method(*args, **kwargs)
- mcp_server_bwt/tools/bing_webmaster.py:198-200 (registration)Registers the 'remove_blocked_url' tool by wrapping the service method with MCP tool decorator.remove_blocked_url = wrap_service_method( # noqa: F841 mcp, service, "blocking", "remove_blocked_url" )
- mcp_server_bwt/main.py:17-17 (registration)Invokes the tool registration function which includes the remove_blocked_url tool.add_bing_webmaster_tools(mcp, bing_service)
- Initializes the ContentBlockingService instance (self.blocking) which provides the remove_blocked_url method used by the tool.self.blocking = content_blocking.ContentBlockingService(self.client)
- Maps the 'blocking' service attribute to ContentBlockingService class for use in tool wrappers."blocking": content_blocking.ContentBlockingService,