submit_content
Submit page content directly to Bing Webmaster Tools for indexing without waiting for crawling. Use this tool to provide URLs and content for faster search engine visibility.
Instructions
Submit page content directly to Bing without crawling.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes | ||
| url | Yes | ||
| content | Yes | ||
| content_type | No | text/html | |
| content_length | No |
Implementation Reference
- mcp_server_bwt/main.py:648-651 (registration)Registration of the submit_content tool using @mcp.tool decorator with name and description.@mcp.tool( name="submit_content", description="Submit page content directly to Bing without crawling.", )
- mcp_server_bwt/main.py:652-687 (handler)The handler function that executes the submit_content tool. It calculates content length if needed and makes a POST request to the Bing Webmaster API's SubmitContent endpoint to submit the page content directly.async def submit_content( site_url: Annotated[str, "The URL of the site"], url: Annotated[str, "The URL of the content"], content: Annotated[str, "The HTML content to submit"], content_type: Annotated[str, "MIME type of the content"] = "text/html", content_length: Annotated[int, "Length of the content in bytes"] = -1, ) -> Dict[str, str]: """ Submit page content directly to Bing without crawling. Args: site_url: The URL of the site url: The URL of the content content: The HTML content to submit content_type: MIME type of the content (default: text/html) content_length: Length of the content in bytes (default: auto-calculated) Returns: Success message """ async with api: if content_length == -1: content_length = len(content.encode("utf-8")) await api._make_request( "SubmitContent", "POST", { "siteUrl": site_url, "url": url, "content": content, "contentType": content_type, "contentLength": content_length, }, ) return {"message": f"Content for {url} submitted successfully"}
- mcp_server_bwt/main.py:652-658 (schema)Input schema defined by function parameters with Annotated types and descriptions for MCP tool validation.async def submit_content( site_url: Annotated[str, "The URL of the site"], url: Annotated[str, "The URL of the content"], content: Annotated[str, "The HTML content to submit"], content_type: Annotated[str, "MIME type of the content"] = "text/html", content_length: Annotated[int, "Length of the content in bytes"] = -1, ) -> Dict[str, str]: