get_link_counts
Retrieve inbound link counts for any website to analyze backlink profiles and monitor SEO performance using Bing Webmaster Tools data.
Instructions
Get inbound link counts for a site.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes |
Implementation Reference
- mcp_server_bwt/main.py:459-459 (registration)Registration of the 'get_link_counts' tool using the @mcp.tool decorator, specifying the name and description.@mcp.tool(name="get_link_counts", description="Get inbound link counts for a site.")
- mcp_server_bwt/main.py:460-474 (handler)The handler function that executes the tool logic: takes site_url, makes an API request to Bing Webmaster Tools for link counts, processes the response with type field, and returns it.async def get_link_counts( site_url: Annotated[str, "The URL of the site"] ) -> Dict[str, Any]: """ Get inbound link counts for a site. Args: site_url: The URL of the site Returns: Link count statistics """ async with api: counts = await api._make_request(f"GetLinkCounts?siteUrl={site_url}") return api._ensure_type_field(counts, "LinkCounts")