Skip to main content
Glama
zizzfizzix

Bing Webmaster Tools MCP Server

by zizzfizzix

add_page_preview_block

Block specific URLs from appearing in Bing search previews to control content visibility and manage user experience on your website.

Instructions

Add a page preview block.

Args: site_url: The URL of the site url: The URL to block from page preview reason: The reason for blocking the page preview

Raises: BingWebmasterError: If preview block cannot be added

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selfYes
site_urlYes
urlYes
reasonYes

Implementation Reference

  • Generic async wrapper function decorated as MCP tool that executes the underlying BingWebmasterService.blocking.add_page_preview_block 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 'add_page_preview_block' tool by wrapping the content_blocking service method.
    add_page_preview_block = wrap_service_method( # noqa: F841 mcp, service, "blocking", "add_page_preview_block" )
  • Top-level call to register all Bing Webmaster tools, including 'add_page_preview_block'.
    add_bing_webmaster_tools(mcp, bing_service)
  • Instantiates the ContentBlockingService instance (self.blocking) that provides the add_page_preview_block method.
    self.blocking = content_blocking.ContentBlockingService(self.client)
  • Maps 'blocking' service attribute to ContentBlockingService class for dynamic access.
    "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