get_keyword_data
Retrieve keyword performance data from Bing Webmaster Tools to analyze search queries and optimize website content for better visibility.
Instructions
Get detailed data for a specific keyword/query.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes | ||
| query | Yes |
Implementation Reference
- mcp_server_bwt/main.py:411-414 (registration)Registers the get_keyword_data tool with MCP, defining its name, description, and input schema using Annotated types.@mcp.tool( name="get_keyword_data", description="Get detailed data for a specific keyword/query.", )
- mcp_server_bwt/main.py:415-432 (handler)Implements the core logic of the get_keyword_data tool by making an API request to retrieve keyword data and ensuring proper typing.async def get_keyword_data( site_url: Annotated[str, "The URL of the site"], query: Annotated[str, "The keyword/query to analyze"], ) -> Dict[str, Any]: """ Get detailed data for a specific keyword/query. Args: site_url: The URL of the site query: The keyword/query to analyze Returns: Keyword performance data """ async with api: data = await api._make_request(f"GetKeyword?siteUrl={site_url}&query={query}") return api._ensure_type_field(data, "KeywordData")