remove_blocked_url
Unblock a specified URL on your site using Bing Webmaster Tools. Provide the site URL, blocked URL, entity type, and block date to resolve access issues and restore visibility.
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) date: The date the URL was blocked
Raises: BingWebmasterError: If URL cannot be unblocked
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blocked_url | Yes | ||
| date | No | ||
| entity_type | No | ||
| self | Yes | ||
| site_url | Yes |
Implementation Reference
- The dynamically generated handler function for the 'remove_blocked_url' MCP tool. This wrapper is decorated with @mcp.tool() and delegates execution to the underlying BingWebmasterService.blocking.remove_blocked_url method.# Create wrapper function with same signature @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) # Copy signature and docstring wrapper.__signature__ = new_sig # type: ignore wrapper.__doc__ = original_method.__doc__
- mcp_server_bwt/tools/bing_webmaster.py:198-200 (registration)Registers the 'remove_blocked_url' tool by invoking wrap_service_method with the appropriate service ('blocking') and method name.remove_blocked_url = wrap_service_method( # noqa: F841 mcp, service, "blocking", "remove_blocked_url" )
- Initializes the 'blocking' service attribute on BingWebmasterService, providing access to the remove_blocked_url method via ContentBlockingService.self.blocking = content_blocking.ContentBlockingService(self.client)
- Maps the string 'blocking' to the ContentBlockingService class, used by wrap_service_method to locate the service class for signature inspection."blocking": content_blocking.ContentBlockingService,
- mcp_server_bwt/main.py:17-17 (registration)Top-level call to add_bing_webmaster_tools, which executes all individual tool registrations including 'remove_blocked_url'.add_bing_webmaster_tools(mcp, bing_service)