get_site_roles
Retrieve a list of users who have access to a website in Bing Webmaster Tools to manage permissions and access control.
Instructions
Get list of users with access to the site.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes |
Implementation Reference
- mcp_server_bwt/main.py:851-853 (registration)Registration of the 'get_site_roles' tool using the @mcp.tool decorator.@mcp.tool( name="get_site_roles", description="Get list of users with access to the site." )
- mcp_server_bwt/main.py:854-868 (handler)The handler function for 'get_site_roles' that makes an API request to retrieve site roles and processes the response.async def get_site_roles( site_url: Annotated[str, "The URL of the site"] ) -> List[Dict[str, Any]]: """ Get list of users with access to the site. Args: site_url: The URL of the site Returns: List of users and their roles """ async with api: roles = await api._make_request(f"GetSiteRoles?siteUrl={site_url}") return api._ensure_type_field(roles, "SiteRoles")