get_wiki_page_suggestions
Find wiki pages in Azure DevOps by typing partial titles or paths. This tool provides autocomplete suggestions to help users quickly locate documentation.
Instructions
Get page suggestions based on partial input - useful for autocomplete-like functionality.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | The name or ID of the project. | |
| wiki_identifier | Yes | The name or ID of the wiki. | |
| partial_input | Yes | Partial page path or title to get suggestions for. |
Implementation Reference
- The core handler function that implements the get_wiki_page_suggestions tool logic. It fetches all wiki pages, scores them based on matching the partial_input, sorts by score, and returns the top 10 suggestions.def get_wiki_page_suggestions(self, project, wiki_identifier, partial_input): """ Get page suggestions based on partial input. """ pages = self.list_wiki_pages(project, wiki_identifier) suggestions = [] for page in pages: path_lower = page["path"].lower() input_lower = partial_input.lower() # Score based on how well the input matches score = 0 if path_lower.startswith(input_lower): score = 100 # Exact prefix match elif input_lower in path_lower: score = 50 # Contains match elif any(part.startswith(input_lower) for part in path_lower.split("/")): score = 25 # Part starts with input if score > 0: suggestions.append({ **page, "match_score": score }) # Sort by score and return top suggestions suggestions.sort(key=lambda x: x["match_score"], reverse=True) return suggestions[:10]
- mcp_azure_devops/server.py:763-785 (registration)Registers the get_wiki_page_suggestions tool in the MCP server, including its name, description, and input schema definition.types.Tool( name="get_wiki_page_suggestions", description="Get page suggestions based on partial input - useful for autocomplete-like functionality.", inputSchema={ "type": "object", "properties": { "project": { "type": "string", "description": "The name or ID of the project." }, "wiki_identifier": { "type": "string", "description": "The name or ID of the wiki." }, "partial_input": { "type": "string", "description": "Partial page path or title to get suggestions for." }, }, "required": ["project", "wiki_identifier", "partial_input"], "additionalProperties": False } ),
- mcp_azure_devops/server.py:766-785 (schema)Defines the input schema for the get_wiki_page_suggestions tool, specifying parameters project, wiki_identifier, and partial_input.inputSchema={ "type": "object", "properties": { "project": { "type": "string", "description": "The name or ID of the project." }, "wiki_identifier": { "type": "string", "description": "The name or ID of the wiki." }, "partial_input": { "type": "string", "description": "Partial page path or title to get suggestions for." }, }, "required": ["project", "wiki_identifier", "partial_input"], "additionalProperties": False } ),
- mcp_azure_devops/server.py:1041-1042 (helper)Dispatch handler in the server's _execute_tool method that calls the client implementation for get_wiki_page_suggestions.elif name == "get_wiki_page_suggestions": return self.client.get_wiki_page_suggestions(**arguments)