submit_content
Submit page content directly to Bing Webmaster Tools for indexing without waiting for crawling. Provide site URL, page URL, and content to ensure search 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 the @mcp.tool decorator.@mcp.tool( name="submit_content", description="Submit page content directly to Bing without crawling.", )
- mcp_server_bwt/main.py:652-658 (schema)Input schema defined by function parameters with typing.Annotated descriptions for MCP tool schema.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]:
- mcp_server_bwt/main.py:659-688 (handler)The core handler logic that calculates content length if needed and makes a POST request to Bing's SubmitContent API endpoint.""" 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"}