Skip to main content
Glama

list_wiki_pages

Retrieve all wiki pages from an Azure DevOps project to view documentation content and structure.

Instructions

Lists all pages in a wiki.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.
wiki_identifierYesThe name or ID of the wiki.

Implementation Reference

  • Core handler function that implements the list_wiki_pages tool logic by calling the Azure DevOps WikiClient to batch fetch wiki pages and formatting the response.
    def list_wiki_pages(self, project, wiki_identifier):
        pages_batch_request = WikiPagesBatchRequest(
            top=100  # Retrieve up to 100 pages
        )
        pages = self.wiki_client.get_pages_batch(
            project=project,
            wiki_identifier=wiki_identifier,
            pages_batch_request=pages_batch_request
        )
        return [
            {
                "path": page.path,
                "url": getattr(page, 'url', ''),  # Handle missing url attribute
                "view_stats": [
                    {"date": stat.date.isoformat(), "count": stat.count}
                    for stat in page.view_stats
                ] if page.view_stats else []
            }
            for page in pages
        ]
  • Input schema definition for the list_wiki_pages tool, specifying required parameters project and wiki_identifier.
    types.Tool(
        name="list_wiki_pages",
        description="Lists all pages in a wiki.",
        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
        }
    ),
  • Tool dispatch/registration in the MCP server's _execute_tool method, which handles the tool call by invoking the client method.
    elif name == "list_wiki_pages":
        return self.client.list_wiki_pages(**arguments)
  • Tool registration in the server's tools list, including name, description, and schema for MCP protocol compliance.
    types.Tool(
        name="list_wiki_pages",
        description="Lists all pages in a wiki.",
        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
        }
    ),

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