Skip to main content
Glama
zizzfizzix

Bing Webmaster Tools MCP Server

by zizzfizzix

save_crawl_settings

Configure crawl settings for a website in Bing Webmaster Tools to control how search engines index your content.

Instructions

Save new crawl settings for a specific site.

Args: site_url: The URL of the site crawl_settings: The new crawl settings to apply

Raises: BingWebmasterError: If settings cannot be saved

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selfYes
site_urlYes
crawl_settingsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Specific registration of the 'save_crawl_settings' MCP tool by wrapping the 'crawling' service's 'save_crawl_settings' method with @mcp.tool() decorator via wrap_service_method.
    save_crawl_settings = wrap_service_method(  # noqa: F841
        mcp, service, "crawling", "save_crawl_settings"
    )
  • The wrap_service_method function creates the actual handler for the tool, decorating it with @mcp.tool(), preserving the original method's signature and docstring, and delegating execution to the underlying service method in BingWebmasterService.crawling.save_crawl_settings.
    def wrap_service_method(
        mcp: FastMCP, service: BingWebmasterService, service_attr: str, method_name: str
    ) -> Callable[..., Any]:
        """Helper function to wrap a service method with mcp.tool() while preserving its signature and docstring.
    
        Args:
            mcp: The MCP server instance
            service: The BingWebmasterService instance
            service_attr: The service attribute name (e.g., 'sites', 'submission')
            method_name: The method name to wrap
    
        Returns:
            The wrapped method as an MCP tool
        """
        # 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'
        new_sig = sig.replace(parameters=parameters)
    
        # 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
  • The add_bing_webmaster_tools function registers all Bing Webmaster tools, including the save_crawl_settings tool in the crawling section.
    def add_bing_webmaster_tools(mcp: FastMCP, service: BingWebmasterService) -> None:
        # Site Management Tools
        get_sites = wrap_service_method(mcp, service, "sites", "get_sites")  # noqa: F841
        add_site = wrap_service_method(mcp, service, "sites", "add_site")  # noqa: F841
        verify_site = wrap_service_method(mcp, service, "sites", "verify_site")  # noqa: F841
        remove_site = wrap_service_method(mcp, service, "sites", "remove_site")  # noqa: F841
        get_site_roles = wrap_service_method(mcp, service, "sites", "get_site_roles")  # noqa: F841
        add_site_roles = wrap_service_method(mcp, service, "sites", "add_site_roles")  # noqa: F841
        remove_site_role = wrap_service_method(mcp, service, "sites", "remove_site_role")  # noqa: F841
        get_site_moves = wrap_service_method(mcp, service, "sites", "get_site_moves")  # noqa: F841
        submit_site_move = wrap_service_method(mcp, service, "sites", "submit_site_move")  # noqa: F841
    
        # Submission Tools
        submit_url = wrap_service_method(mcp, service, "submission", "submit_url")  # noqa: F841
        submit_url_batch = wrap_service_method(  # noqa: F841
            mcp, service, "submission", "submit_url_batch"
        )
        submit_content = wrap_service_method(mcp, service, "submission", "submit_content")  # noqa: F841
        submit_feed = wrap_service_method(mcp, service, "submission", "submit_feed")  # noqa: F841
        get_feeds = wrap_service_method(mcp, service, "submission", "get_feeds")  # noqa: F841
        get_feed_details = wrap_service_method(  # noqa: F841
            mcp, service, "submission", "get_feed_details"
        )
        remove_feed = wrap_service_method(mcp, service, "submission", "remove_feed")  # noqa: F841
        get_url_submission_quota = wrap_service_method(  # noqa: F841
            mcp, service, "submission", "get_url_submission_quota"
        )
        get_content_submission_quota = wrap_service_method(  # noqa: F841
            mcp, service, "submission", "get_content_submission_quota"
        )
        fetch_url = wrap_service_method(mcp, service, "submission", "fetch_url")  # noqa: F841
        get_fetched_urls = wrap_service_method(  # noqa: F841
            mcp, service, "submission", "get_fetched_urls"
        )
        get_fetched_url_details = wrap_service_method(  # noqa: F841
            mcp, service, "submission", "get_fetched_url_details"
        )
    
        # Traffic Analysis Tools
        get_query_stats = wrap_service_method(mcp, service, "traffic", "get_query_stats")  # noqa: F841
        get_query_traffic_stats = wrap_service_method(  # noqa: F841
            mcp, service, "traffic", "get_query_traffic_stats"
        )
        get_query_page_stats = wrap_service_method(  # noqa: F841
            mcp, service, "traffic", "get_query_page_stats"
        )
        get_query_page_detail_stats = wrap_service_method(  # noqa: F841
            mcp, service, "traffic", "get_query_page_detail_stats"
        )
        get_page_stats = wrap_service_method(mcp, service, "traffic", "get_page_stats")  # noqa: F841
        get_page_query_stats = wrap_service_method(  # noqa: F841
            mcp, service, "traffic", "get_page_query_stats"
        )
        get_rank_and_traffic_stats = wrap_service_method(  # noqa: F841
            mcp, service, "traffic", "get_rank_and_traffic_stats"
        )
    
        # Crawling Tools
        get_crawl_stats = wrap_service_method(mcp, service, "crawling", "get_crawl_stats")  # noqa: F841
        get_crawl_settings = wrap_service_method(  # noqa: F841
            mcp, service, "crawling", "get_crawl_settings"
        )
        save_crawl_settings = wrap_service_method(  # noqa: F841
            mcp, service, "crawling", "save_crawl_settings"
        )
        get_crawl_issues = wrap_service_method(mcp, service, "crawling", "get_crawl_issues")  # noqa: F841
    
        # Keyword Analysis Tools
        get_keyword = wrap_service_method(mcp, service, "keywords", "get_keyword")  # noqa: F841
        get_keyword_stats = wrap_service_method(  # noqa: F841
            mcp, service, "keywords", "get_keyword_stats"
        )
        get_related_keywords = wrap_service_method(  # noqa: F841
            mcp, service, "keywords", "get_related_keywords"
        )
    
        # Link Analysis Tools
        get_link_counts = wrap_service_method(mcp, service, "links", "get_link_counts")  # noqa: F841
        get_url_links = wrap_service_method(mcp, service, "links", "get_url_links")  # noqa: F841
        get_deep_link = wrap_service_method(mcp, service, "links", "get_deep_link")  # noqa: F841
        get_deep_link_blocks = wrap_service_method(  # noqa: F841
            mcp, service, "links", "get_deep_link_blocks"
        )
        add_deep_link_block = wrap_service_method(  # noqa: F841
            mcp, service, "links", "add_deep_link_block"
        )
        remove_deep_link_block = wrap_service_method(  # noqa: F841
            mcp, service, "links", "remove_deep_link_block"
        )
        update_deep_link = wrap_service_method(mcp, service, "links", "update_deep_link")  # noqa: F841
        get_deep_link_algo_urls = wrap_service_method(  # noqa: F841
            mcp, service, "links", "get_deep_link_algo_urls"
        )
        get_connected_pages = wrap_service_method(  # noqa: F841
            mcp, service, "links", "get_connected_pages"
        )
        add_connected_page = wrap_service_method(  # noqa: F841
            mcp, service, "links", "add_connected_page"
        )
    
        # Content Management Tools
        get_url_info = wrap_service_method(mcp, service, "content", "get_url_info")  # noqa: F841
        get_url_traffic_info = wrap_service_method(  # noqa: F841
            mcp, service, "content", "get_url_traffic_info"
        )
        get_children_url_info = wrap_service_method(  # noqa: F841
            mcp, service, "content", "get_children_url_info"
        )
        get_children_url_traffic_info = wrap_service_method(  # noqa: F841
            mcp, service, "content", "get_children_url_traffic_info"
        )
    
        # Content Blocking Tools
        get_blocked_urls = wrap_service_method(mcp, service, "blocking", "get_blocked_urls")  # noqa: F841
        add_blocked_url = wrap_service_method(mcp, service, "blocking", "add_blocked_url")  # noqa: F841
        remove_blocked_url = wrap_service_method(  # noqa: F841
            mcp, service, "blocking", "remove_blocked_url"
        )
        get_active_page_preview_blocks = wrap_service_method(  # noqa: F841
            mcp, service, "blocking", "get_active_page_preview_blocks"
        )
        add_page_preview_block = wrap_service_method(  # noqa: F841
            mcp, service, "blocking", "add_page_preview_block"
        )
        remove_page_preview_block = wrap_service_method(  # noqa: F841
            mcp, service, "blocking", "remove_page_preview_block"
        )
    
        # Regional Settings Tools
        get_country_region_settings = wrap_service_method(  # noqa: F841
            mcp, service, "regional", "get_country_region_settings"
        )
        add_country_region_settings = wrap_service_method(  # noqa: F841
            mcp, service, "regional", "add_country_region_settings"
        )
        remove_country_region_settings = wrap_service_method(  # noqa: F841
            mcp, service, "regional", "remove_country_region_settings"
        )
    
        # URL Management Tools
        get_query_parameters = wrap_service_method(  # noqa: F841
            mcp, service, "urls", "get_query_parameters"
        )
        add_query_parameter = wrap_service_method(  # noqa: F841
            mcp, service, "urls", "add_query_parameter"
        )
        remove_query_parameter = wrap_service_method(  # noqa: F841
            mcp, service, "urls", "remove_query_parameter"
        )
        enable_disable_query_parameter = wrap_service_method(  # noqa: F841
            mcp, service, "urls", "enable_disable_query_parameter"
        )
  • Top-level registration of all tools by calling add_bing_webmaster_tools after initializing the BingWebmasterService.
    # Add the tools to the MCP server
    add_bing_webmaster_tools(mcp, bing_service)
  • Initialization of the crawling service instance within BingWebmasterService.__aenter__, which provides the underlying service object called by the tool handler.
    self.traffic = traffic_analysis.TrafficAnalysisService(self.client)
    self.crawling = crawling.CrawlingService(self.client)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions that settings are 'saved' and 'applied,' implying a write operation, and notes an error case ('Raises: BingWebmasterError'), which adds some context. However, it lacks critical details like whether this is idempotent, what permissions are required, if it's destructive to existing settings, or typical response behavior, leaving significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the main purpose, followed by Args and Raises sections. It uses minimal sentences without redundancy. However, the Args section could be more integrated into the flow, and some details feel slightly sparse, preventing a perfect score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which reduces need to describe return values) but no annotations and 0% schema coverage, the description is moderately complete. It covers the basic operation and error handling but lacks depth on parameters, behavioral traits, and usage context. For a mutation tool with three parameters, this is adequate but leaves clear gaps in guidance and transparency.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It briefly explains 'site_url' and 'crawl_settings' in the Args section, providing basic semantics. However, it doesn't detail the structure of 'crawl_settings' (e.g., what fields like 'CrawlRate' mean) or clarify the 'self' parameter, leaving parameters partially undocumented. This meets the baseline for some added value but doesn't fully address the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Save new crawl settings') and target resource ('for a specific site'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_crawl_settings' or 'update_deep_link' in terms of scope or function, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_crawl_settings' for retrieval or other configuration tools. There's no mention of prerequisites, such as needing existing site setup or permissions, nor any context about when this operation is appropriate versus other site management tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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