get_recent_wiki_pages
Retrieve recently modified wiki pages from Azure DevOps projects to track documentation changes and maintain current knowledge.
Instructions
Get recently modified wiki pages based on activity.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of pages to return (default: 10). | |
| project | Yes | The name or ID of the project. | |
| wiki_identifier | Yes | The name or ID of the wiki. |
Implementation Reference
- The main handler function that fetches wiki pages, sorts them by recent activity using view stats as a proxy, and returns the top limited results.def get_recent_wiki_pages(self, project, wiki_identifier, limit=10): """ Get recently modified wiki pages. """ pages = self.list_wiki_pages(project, wiki_identifier) # Sort by view stats if available (proxy for recent activity) pages_with_activity = [] for page in pages: if page.get("view_stats"): latest_activity = max(page["view_stats"], key=lambda x: x["date"]) if page["view_stats"] else None pages_with_activity.append({ **page, "latest_activity": latest_activity }) else: pages_with_activity.append({ **page, "latest_activity": None }) # Sort by latest activity date pages_with_activity.sort( key=lambda x: x["latest_activity"]["date"] if x["latest_activity"] else "1900-01-01", reverse=True ) return pages_with_activity[:limit]
- mcp_azure_devops/server.py:740-762 (schema)Defines the JSON schema for the tool's input parameters: project and wiki_identifier required, limit optional.types.Tool( name="get_recent_wiki_pages", description="Get recently modified wiki pages based on activity.", 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." }, "limit": { "type": "integer", "description": "Maximum number of pages to return (default: 10)." }, }, "required": ["project", "wiki_identifier"], "additionalProperties": False } ),
- mcp_azure_devops/server.py:1039-1040 (registration)Tool registration in the main dispatcher (_execute_tool method), which calls the client handler with unpacked arguments.elif name == "get_recent_wiki_pages": return self.client.get_recent_wiki_pages(**arguments)