add_site_roles
Delegate site access to users in Bing Webmaster Tools by assigning roles with specific permissions for website management.
Instructions
Delegate site access to another user.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes | ||
| user_email | Yes | ||
| auth_token | Yes | ||
| role_type | Yes | ||
| is_explicit | No | ||
| should_notify | No |
Implementation Reference
- mcp_server_bwt/main.py:871-907 (handler)The handler function for the add_site_roles tool, decorated with @mcp.tool(name="add_site_roles"). It makes a POST request to the 'AddSiteRoles' API endpoint with the provided parameters to delegate site access.@mcp.tool(name="add_site_roles", description="Delegate site access to another user.") async def add_site_roles( site_url: Annotated[str, "The URL of the site"], user_email: Annotated[str, "Email of the user to grant access"], auth_token: Annotated[str, "Authentication token"], role_type: Annotated[str, "Type of role to grant"], is_explicit: Annotated[bool, "Whether the role is explicit"] = True, should_notify: Annotated[bool, "Whether to notify the user"] = True, ) -> Dict[str, str]: """ Delegate site access to another user. Args: site_url: The URL of the site user_email: Email of the user to grant access auth_token: Authentication token role_type: Type of role to grant is_explicit: Whether the role is explicit should_notify: Whether to notify the user Returns: Success message """ async with api: await api._make_request( "AddSiteRoles", "POST", { "siteUrl": site_url, "userEmail": user_email, "authToken": auth_token, "roleType": role_type, "isExplicit": is_explicit, "shouldNotify": should_notify, }, ) return {"message": f"Access granted to {user_email} successfully"}