Skip to main content
Glama
isiahw1

mcp-server-bing-webmaster

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
NameRequiredDescriptionDefault
site_urlYes

Implementation Reference

  • 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."
    )
  • 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")
  • 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]]:

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