Skip to main content
Glama
isiahw1

mcp-server-bing-webmaster

add_site_roles

Delegate site access to another user in Bing Webmaster Tools by assigning specific roles with configurable notification settings.

Instructions

Delegate site access to another user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_urlYes
user_emailYes
auth_tokenYes
role_typeYes
is_explicitNo
should_notifyNo

Implementation Reference

  • The main handler function for the 'add_site_roles' tool. It is decorated with @mcp.tool for registration and implements the logic by calling the Bing Webmaster API's AddSiteRoles endpoint via POST request to grant site access to a specified user.
    @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"}
  • The @mcp.tool decorator registers the 'add_site_roles' tool with the MCP server, specifying its name and description.
    @mcp.tool(name="add_site_roles", description="Delegate site access to another user.")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/isiahw1/mcp-server-bing-webmaster'

If you have feedback or need assistance with the MCP directory API, please join our Discord server