Skip to main content
Glama
zizzfizzix

Bing Webmaster Tools MCP Server

by zizzfizzix

add_site

Add a new website to Bing Webmaster Tools for indexing and management. Submit site URLs to monitor performance and access webmaster features.

Instructions

Add a new site to Bing Webmaster Tools.

Args: site_url: The URL of the site to add

Raises: BingWebmasterError: If the site cannot be added

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selfYes
site_urlYes

Implementation Reference

  • Dynamic handler implementation for the 'add_site' MCP tool. This wrapper function is decorated with @mcp.tool(), preserves the original method's signature and docstring, and executes the underlying SiteManagementService.add_site method via the BingWebmasterService instance.
    @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_site' tool by invoking wrap_service_method, which creates the handler and registers it with the MCP server.
    add_site = wrap_service_method(mcp, service, "sites", "add_site") # noqa: F841
  • Top-level registration invocation that adds all Bing Webmaster Tools, including 'add_site', to the MCP server.
    add_bing_webmaster_tools(mcp, bing_service)
  • Initialization of the 'sites' service attribute (SiteManagementService instance) used by the 'add_site' handler.
    self.sites = site_management.SiteManagementService(self.client)
  • Mapping used by wrap_service_method to retrieve the SiteManagementService class for signature and docstring preservation.
    "sites": site_management.SiteManagementService,

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