Skip to main content
Glama
isiahw1

mcp-server-bing-webmaster

add_blocked_url

Block specific URLs or directories from Bing's web crawler to control site indexing and manage search engine visibility.

Instructions

Block a URL or directory from being crawled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_urlYes
urlYes
block_typeNoDirectory

Implementation Reference

  • The main handler function for the 'add_blocked_url' tool. It takes site_url, url, and optional block_type parameters, makes a POST request to the Bing API's 'AddBlockedUrl' endpoint, and returns a success message.
    async def add_blocked_url( site_url: Annotated[str, "The URL of the site"], url: Annotated[str, "The URL or directory to block"], block_type: Annotated[str, "Type of block (Page or Directory)"] = "Directory", ) -> Dict[str, str]: """ Block a URL or directory from being crawled. Args: site_url: The URL of the site url: The URL or directory to block block_type: Type of block ("Page" or "Directory") Returns: Success message """ async with api: await api._make_request( "AddBlockedUrl", "POST", {"siteUrl": site_url, "blockedUrl": url, "blockType": block_type}, ) return {"message": f"URL {url} blocked successfully"}
  • Registers the 'add_blocked_url' tool with the MCP framework using the @mcp.tool decorator, defining its name and description.
    @mcp.tool( name="add_blocked_url", description="Block a URL or directory from being crawled." )
  • Input schema defined using Annotated types with descriptions for parameters and return type.
    site_url: Annotated[str, "The URL of the site"], url: Annotated[str, "The URL or directory to block"], block_type: Annotated[str, "Type of block (Page or Directory)"] = "Directory",

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