Skip to main content
Glama
zizzfizzix

Bing Webmaster Tools MCP Server

by zizzfizzix

submit_content

Submit specific URL content, including HTTP message and structured data, to Bing Webmaster Tools for indexing and device targeting optimization.

Instructions

Submit content for a specific URL.

Args: site_url: Site url E.g.: http://example.com url: Url to submit E.g.: http://example.com/url1.html http_message: HTTP message (base64 encoded) structured_data: Structured Data (base64 encoded) dynamic_serving: Device targeting (0-5). {none = 0, PC-laptop = 1, mobile = 2, AMP = 3, tablet = 4, non-visual browser = 5}

Raises: BingWebmasterError: If content cannot be submitted

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dynamic_servingYes
http_messageYes
selfYes
site_urlYes
structured_dataYes
urlYes

Implementation Reference

  • The async wrapper function decorated as an MCP tool (@mcp.tool()) that implements the core logic of the 'submit_content' tool by invoking the underlying SubmissionService.submit_content method via getattr and async context.
    @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__
  • Registers the 'submit_content' tool by calling wrap_service_method, which defines and decorates the handler function with @mcp.tool().
    submit_content = wrap_service_method(mcp, service, "submission", "submit_content") # noqa: F841
  • Inspects the signature of the original SubmissionService.submit_content method, removes the 'self' parameter, and sets it on the wrapper for MCP tool input schema.
    # Get the service class from our mapping service_class = SERVICE_CLASSES[service_attr] # Get the original method original_method = getattr(service_class, method_name) # Get the signature sig = inspect.signature(original_method) # Remove 'self' parameter from signature parameters = list(sig.parameters.values())[1:] # Skip 'self' # Create new signature without 'self'
  • Mapping used by wrap_service_method to resolve the service class for 'submission' to access the submit_content method.
    SERVICE_CLASSES = { "sites": site_management.SiteManagementService, "submission": submission.SubmissionService, "traffic": traffic_analysis.TrafficAnalysisService, "crawling": crawling.CrawlingService, "keywords": keyword_analysis.KeywordAnalysisService, "links": link_analysis.LinkAnalysisService, "content": content_management.ContentManagementService, "blocking": content_blocking.ContentBlockingService, "regional": regional_settings.RegionalSettingsService, "urls": url_management.UrlManagementService, }
  • Invokes the function that creates and registers all Bing Webmaster tools, including 'submit_content'.
    add_bing_webmaster_tools(mcp, bing_service)

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