get_url_info
Retrieve detailed insights about a specific URL, including indexing status and performance metrics, directly from Bing Webmaster Tools API via the MCP Server interface.
Instructions
Retrieve detailed information for a specific URL.
Args: site_url: The URL of the site url: The specific URL to get information for
Returns: UrlInfo: Detailed information about the URL
Raises: BingWebmasterError: If URL information cannot be retrieved
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| self | Yes | ||
| site_url | Yes | ||
| url | Yes |
Implementation Reference
- Dynamically generated async wrapper function decorated as @mcp.tool(), which executes the tool logic by invoking the underlying content_management.ContentManagementService.get_url_info method.@mcp.tool() @wraps(original_method) async def wrapper(*args: Any, **kwargs: Any) -> Any: # Filter out any 'self' arguments that might be passed by the MCP client kwargs = {k: v for k, v in kwargs.items() if k != "self"} async with service as s: service_obj = getattr(s, service_attr) # Get the method from the instance method = getattr(service_obj, method_name) # Call the method directly - it's already bound to the instance return await method(*args, **kwargs) # Copy signature and docstring wrapper.__signature__ = new_sig # type: ignore wrapper.__doc__ = original_method.__doc__ return wrapper
- mcp_server_bwt/tools/bing_webmaster.py:184-184 (registration)Registers the 'get_url_info' tool by creating and assigning the wrapped service method.get_url_info = wrap_service_method(mcp, service, "content", "get_url_info") # noqa: F841
- mcp_server_bwt/main.py:17-17 (registration)Invokes the tool registration function, which includes the get_url_info tool registration.add_bing_webmaster_tools(mcp, bing_service)
- Initializes the 'content' service attribute on BingWebmasterService, providing the ContentManagementService instance used by get_url_info.self.content = content_management.ContentManagementService(self.client)
- Maps the 'content' service attribute name to its class for dynamic service instantiation in the wrapper."content": content_management.ContentManagementService,