get_feeds
Retrieve RSS and Atom feeds for any website to monitor content updates and integrate with feed readers or automation systems.
Instructions
Get all RSS/Atom feeds for a site.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes |
Implementation Reference
- mcp_server_bwt/main.py:911-927 (handler)The main handler function for the 'get_feeds' tool. It uses the global 'api' instance to make a request to the Bing Webmaster API's GetFeeds endpoint and returns the list of feeds with type fields ensured for MCP compatibility.@mcp.tool(name="get_feeds", description="Get all RSS/Atom feeds for a site.") async def get_feeds( site_url: Annotated[str, "The URL of the site"] ) -> List[Dict[str, Any]]: """ Get all RSS/Atom feeds for a site. Args: site_url: The URL of the site Returns: List of feeds """ async with api: feeds = await api._make_request(f"GetFeeds?siteUrl={site_url}") return api._ensure_type_field(feeds, "Feed")
- mcp_server_bwt/main.py:911-911 (registration)The @mcp.tool decorator registers the get_feeds function as an MCP tool with the specified name and description.@mcp.tool(name="get_feeds", description="Get all RSS/Atom feeds for a site.")
- mcp_server_bwt/main.py:912-914 (schema)Input schema defined by Annotated type for site_url (str) and output as List[Dict[str, Any]].async def get_feeds( site_url: Annotated[str, "The URL of the site"] ) -> List[Dict[str, Any]]:
- mcp_server_bwt/main.py:124-124 (helper)Global api instance used by the tool for making requests.api = BingWebmasterAPI(API_KEY)
- mcp_server_bwt/main.py:112-121 (helper)Helper method on the api class to add __type fields to responses for MCP compatibility, used in the tool.def _ensure_type_field(self, data: Any, type_name: str) -> Any: """Ensure __type field is present for MCP compatibility.""" if isinstance(data, list): for item in data: if isinstance(item, dict) and "__type" not in item: item["__type"] = f"{type_name}:#Microsoft.Bing.Webmaster.Api" elif isinstance(data, dict) and "__type" not in data: data["__type"] = f"{type_name}:#Microsoft.Bing.Webmaster.Api" return data