Skip to main content
Glama
zizzfizzix

Bing Webmaster Tools MCP Server

by zizzfizzix

get_blocked_urls

Retrieve a list of blocked pages or directories for a specific website using the Bing Webmaster Tools API to identify and manage access restrictions.

Instructions

Get a list of blocked pages/directories for a site.

Args: site_url: The URL of the site

Returns: List[BlockedUrl]: List of blocked URLs and their settings

Raises: BingWebmasterError: If blocked URLs cannot be retrieved

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selfYes
site_urlYes

Implementation Reference

  • The generic wrapper function decorated with @mcp.tool() that serves as the MCP handler for get_blocked_urls (and other tools). It dynamically calls the underlying service 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__ return wrapper
  • Specific registration of the 'get_blocked_urls' MCP tool by wrapping the 'blocking' service's 'get_blocked_urls' method.
    get_blocked_urls = wrap_service_method(mcp, service, "blocking", "get_blocked_urls") # noqa: F841
  • Invokes the function that registers all Bing Webmaster tools, including 'get_blocked_urls'.
    add_bing_webmaster_tools(mcp, bing_service)
  • Attaches the ContentBlockingService instance (containing get_blocked_urls method) to the BingWebmasterService as 'blocking'.
    self.blocking = content_blocking.ContentBlockingService(self.client)
  • Maps the 'blocking' service attribute to its class for dynamic method lookup.
    "blocking": content_blocking.ContentBlockingService,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zizzfizzix/mcp-server-bwt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server