get_site_roles
Retrieve a list of users who have access to a website in Bing Webmaster Tools by providing the site URL.
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)Tool registration using @mcp.tool decorator with name 'get_site_roles' and description.@mcp.tool( name="get_site_roles", description="Get list of users with access to the site." )
- mcp_server_bwt/main.py:854-869 (handler)The main handler function for get_site_roles tool. It makes an API request to GetSiteRoles endpoint and processes the response using api._ensure_type_field.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")
- mcp_server_bwt/main.py:854-856 (schema)Function signature defining input (site_url: str) and output (List[Dict[str, Any]]) schema via type annotations and Annotated.async def get_site_roles( site_url: Annotated[str, "The URL of the site"] ) -> List[Dict[str, Any]]: