add_country_region_settings
Configure geographic targeting for websites in Bing Webmaster Tools by specifying country and region codes to control search visibility.
Instructions
Add country/region targeting settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes | ||
| country_code | Yes | ||
| region_code | No |
Implementation Reference
- mcp_server_bwt/main.py:1041-1044 (registration)Tool registration using the @mcp.tool decorator with name and description.@mcp.tool( name="add_country_region_settings", description="Add country/region targeting settings.", )
- mcp_server_bwt/main.py:1045-1070 (handler)The main handler function for the tool, which makes a POST request to the Bing API endpoint 'AddCountryRegionSettings' with the provided site URL, country code, and region code.async def add_country_region_settings( site_url: Annotated[str, "The URL of the site"], country_code: Annotated[str, "ISO country code"], region_code: Annotated[str, "Region code"] = "", ) -> Dict[str, str]: """ Add country/region targeting settings. Args: site_url: The URL of the site country_code: ISO country code (e.g., 'US', 'GB') region_code: Region code (optional) Returns: Success message """ async with api: await api._make_request( "AddCountryRegionSettings", "POST", { "siteUrl": site_url, "settings": {"countryCode": country_code, "regionCode": region_code}, }, ) return {"message": f"Country/region settings added successfully"}