add_country_region_settings
Configure geographic targeting for websites by adding country and region settings to optimize search visibility in specific locations using Bing Webmaster Tools.
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-1070 (handler)The MCP tool registration and handler implementation for 'add_country_region_settings'. The function takes site_url, country_code, and optional region_code, then makes a POST request to the 'AddCountryRegionSettings' API endpoint via the api client, returning a success message. The type annotations define the input schema.@mcp.tool( name="add_country_region_settings", description="Add country/region targeting settings.", ) 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"}