get_page_history
Retrieve revision history for a Wizzypedia page by specifying the title and optionally limiting the number of revisions. Facilitates tracking changes and updates on wiki pages.
Instructions
Get revision history of a page
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of revisions to return (default: 10) | |
| title | Yes | Title of the page |
Implementation Reference
- index.ts:776-827 (handler)MCP tool call handler for 'get_page_history': extracts parameters, calls wikiClient.getPageHistory, handles missing page, formats revisions into JSON response.case "get_page_history": { const { title, limit = 10 } = request.params.arguments as { title: string; limit?: number; }; const result = await wikiClient.getPageHistory(title, limit); const pages = result.query.pages; const page = pages[0]; if (page.missing) { return { content: [ { type: "text", text: JSON.stringify( { title: page.title, exists: false, message: "Page does not exist" }, null, 2 ) } ] }; } const revisions = page.revisions.map((rev: any) => ({ id: rev.revid, timestamp: rev.timestamp, user: rev.user, comment: rev.comment })); return { content: [ { type: "text", text: JSON.stringify( { title: page.title, revisions }, null, 2 ) } ] }; }
- index.ts:441-449 (helper)MediaWikiClient method that performs the API query to retrieve the revision history of a page.async getPageHistory(title: string, limit: number = 10): Promise<any> { return this.makeApiCall({ action: "query", prop: "revisions", titles: title, rvprop: "timestamp|user|comment|ids", rvlimit: limit }); }
- index.ts:549-567 (schema)Tool definition object specifying name, description, and input schema for 'get_page_history'.const GET_PAGE_HISTORY_TOOL: Tool = { name: "get_page_history", description: "Get revision history of a page", inputSchema: { type: "object", properties: { title: { type: "string", description: "Title of the page" }, limit: { type: "number", description: "Maximum number of revisions to return (default: 10)", default: 10 } }, required: ["title"] } };
- index.ts:599-606 (registration)Registration of 'get_page_history' tool (as GET_PAGE_HISTORY_TOOL) in the listTools response handler.tools: [ SEARCH_PAGES_TOOL, READ_PAGE_TOOL, CREATE_PAGE_TOOL, UPDATE_PAGE_TOOL, GET_PAGE_HISTORY_TOOL, GET_CATEGORIES_TOOL ]