remove_feed
Remove previously submitted sitemap feeds from Bing Webmaster Tools to manage site indexing and crawl efficiency.
Instructions
Remove a previously submitted sitemap feed.
Args: site_url: The URL of the site feed_url: The URL of the feed to remove
Raises: BingWebmasterError: If feed cannot be removed
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| self | Yes | ||
| site_url | Yes | ||
| feed_url | Yes |
Implementation Reference
- mcp_server_bwt/tools/bing_webmaster.py:106-106 (registration)Registers the 'remove_feed' MCP tool by calling wrap_service_method, which creates and decorates a wrapper function with @mcp.tool() that delegates to BingWebmasterService.submission.remove_feed.remove_feed = wrap_service_method(mcp, service, "submission", "remove_feed") # noqa: F841
- The dynamically generated handler function for the 'remove_feed' tool. It uses the service instance to call submission.remove_feed with the input arguments, preserving the original method's signature and documentation.@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__
- Mapping of service attribute names to their classes, used by wrap_service_method to get the original method signature for 'submission.remove_feed'.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, }
- Initializes the 'submission' service attribute on BingWebmasterService, which provides the 'remove_feed' method instance used by the tool handler.self.submission = submission.SubmissionService(self.client)
- mcp_server_bwt/main.py:17-17 (registration)Calls the function that registers all Bing Webmaster tools, including 'remove_feed', to the MCP server.add_bing_webmaster_tools(mcp, bing_service)