Skip to main content
Glama
zizzfizzix

Bing Webmaster Tools MCP Server

by zizzfizzix

add_connected_page

Connect a page linking to your website by providing its URL and your site's URL using the MCP server. Ensures proper indexing and visibility in Bing Webmaster Tools.

Instructions

Add a page which has a link to your website.

Args: site_url: The URL of your site master_url: The URL of the page to be connected

Raises: BingWebmasterError: If page cannot be connected

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
master_urlYes
selfYes
site_urlYes

Implementation Reference

  • Generic handler wrapper decorated as MCP tool (@mcp.tool()) that binds and executes the underlying LinkAnalysisService.add_connected_page method via dynamic getattr.
    # 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__
  • Specific registration of the 'add_connected_page' tool by wrapping the 'links' service's 'add_connected_page' method, preserving signature and docstring.
    add_connected_page = wrap_service_method( # noqa: F841 mcp, service, "links", "add_connected_page" )
  • Invokes the function that registers all Bing Webmaster tools, including 'add_connected_page', to the MCP server.
    add_bing_webmaster_tools(mcp, bing_service)
  • Initializes the 'links' service instance (LinkAnalysisService) used by the add_connected_page tool handler.
    self.links = link_analysis.LinkAnalysisService(self.client)
  • Maps the 'links' service attribute to its class for dynamic method lookup in the wrapper.
    "links": link_analysis.LinkAnalysisService,

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