get_wiki_page_tree
Retrieve the hierarchical structure of Azure DevOps wiki pages to improve navigation and organization within projects.
Instructions
Get hierarchical structure of wiki pages for better navigation.
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. |
Implementation Reference
- The handler function that executes the tool logic: lists wiki pages and builds a nested dictionary representing the hierarchical page tree.def get_wiki_page_tree(self, project, wiki_identifier): """ Get hierarchical structure of wiki pages. """ pages = self.list_wiki_pages(project, wiki_identifier) # Organize pages into a tree structure tree = {} for page in pages: path_parts = page["path"].strip("/").split("/") current_level = tree for i, part in enumerate(path_parts): if part not in current_level: current_level[part] = { "children": {}, "info": None } if i == len(path_parts) - 1: # This is the final part, store page info current_level[part]["info"] = page current_level = current_level[part]["children"] return tree
- mcp_azure_devops/server.py:673-687 (schema)Input schema definition for the get_wiki_page_tree tool, validating required parameters project and wiki_identifier.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." }, }, "required": ["project", "wiki_identifier"], "additionalProperties": False }
- mcp_azure_devops/server.py:1023-1024 (registration)Registration and dispatch logic in the tool execution handler that routes calls to the client.get_wiki_page_tree method.elif name == "get_wiki_page_tree": return self.client.get_wiki_page_tree(**arguments)
- mcp_azure_devops/server.py:670-688 (registration)The tool object definition and registration in the server's tools list.types.Tool( name="get_wiki_page_tree", description="Get hierarchical structure of wiki pages for better navigation.", 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." }, }, "required": ["project", "wiki_identifier"], "additionalProperties": False } ),