Skip to main content
Glama

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
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.
wiki_identifierYesThe name or ID of the wiki.
partial_inputYesPartial 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]
  • 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 } ),
  • 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 } ),
  • 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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xrmghost/mcp-azure-devops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server